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 : 810080 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 (2547139) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2547139) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225220 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2547139'] with mtr_portfolio_ids : ['20225220'] and first list_photo_ids : [] new path : /proc/810080/ Name: python3 Umask: 0002 State: R (running) Tgid: 810080 Ngid: 0 Pid: 810080 PPid: 810079 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 810080 NSpid: 810080 NSpgid: 808159 NSsid: 808159 VmPeak: 1106580 kB VmSize: 1106556 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97872 kB VmRSS: 97872 kB RssAnon: 59732 kB RssFile: 38140 kB RssShmem: 0 kB VmData: 865308 kB VmStk: 132 kB VmExe: 2640 kB VmLib: 130468 kB VmPTE: 584 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: 45 nonvoluntary_ctxt_switches: 84 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '810080', 'Ngid': '0', 'Pid': '810080', 'PPid': '810079', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '810080', 'NSpid': '810080', 'NSpgid': '808159', 'NSsid': '808159', 'VmPeak': '1106580 kB', 'VmSize': '1106556 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97872 kB', 'VmRSS': '97872 kB', 'RssAnon': '59732 kB', 'RssFile': '38140 kB', 'RssShmem': '0 kB', 'VmData': '865308 kB', 'VmStk': '132 kB', 'VmExe': '2640 kB', 'VmLib': '130468 kB', 'VmPTE': '584 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': '45', 'nonvoluntary_ctxt_switches': '84'} ('datou_batch_current', '810080', '1106580', '0', '1106556', '865308', '97872', b'', 'marlene', '2547139') 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 (20225220) 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 (2547139 ) ) 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 (20225220) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1334633741, 'portfolio_id': 20225220}, {'photo_id': 1334633733, 'portfolio_id': 20225220}, {'photo_id': 1334633728, 'portfolio_id': 20225220}, {'photo_id': 1334633727, 'portfolio_id': 20225220}, {'photo_id': 1334633723, 'portfolio_id': 20225220}, {'photo_id': 1334633721, 'portfolio_id': 20225220}, {'photo_id': 1334633697, 'portfolio_id': 20225220}, {'photo_id': 1334633694, 'portfolio_id': 20225220}, {'photo_id': 1334633691, 'portfolio_id': 20225220}, {'photo_id': 1334633673, 'portfolio_id': 20225220}, {'photo_id': 1334633670, 'portfolio_id': 20225220}, {'photo_id': 1334633665, 'portfolio_id': 20225220}, {'photo_id': 1334633660, 'portfolio_id': 20225220}, {'photo_id': 1334633652, 'portfolio_id': 20225220}, {'photo_id': 1334633648, 'portfolio_id': 20225220}, {'photo_id': 1334633629, 'portfolio_id': 20225220}, {'photo_id': 1334633625, 'portfolio_id': 20225220}, {'photo_id': 1334633622, 'portfolio_id': 20225220}, {'photo_id': 1334633590, 'portfolio_id': 20225220}, {'photo_id': 1334633587, 'portfolio_id': 20225220}, {'photo_id': 1334633473, 'portfolio_id': 20225220}, {'photo_id': 1334633469, 'portfolio_id': 20225220}, {'photo_id': 1334633467, 'portfolio_id': 20225220}, {'photo_id': 1334633384, 'portfolio_id': 20225220}, {'photo_id': 1334633380, 'portfolio_id': 20225220}, {'photo_id': 1334633376, 'portfolio_id': 20225220}, {'photo_id': 1334633312, 'portfolio_id': 20225220}, {'photo_id': 1334633297, 'portfolio_id': 20225220}, {'photo_id': 1334633202, 'portfolio_id': 20225220}, {'photo_id': 1334633200, 'portfolio_id': 20225220}, {'photo_id': 1334633197, 'portfolio_id': 20225220}, {'photo_id': 1334633191, 'portfolio_id': 20225220}, {'photo_id': 1334633184, 'portfolio_id': 20225220}, {'photo_id': 1334633177, 'portfolio_id': 20225220}, {'photo_id': 1334632915, 'portfolio_id': 20225220}, {'photo_id': 1334632912, 'portfolio_id': 20225220}, {'photo_id': 1334632908, 'portfolio_id': 20225220}] map_portfolio_id_photo_id: {20225220: [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721, 1334633697, 1334633694, 1334633691, 1334633673, 1334633670, 1334633665, 1334633660, 1334633652, 1334633648, 1334633629, 1334633625, 1334633622, 1334633590, 1334633587, 1334633473, 1334633469, 1334633467, 1334633384, 1334633380, 1334633376, 1334633312, 1334633297, 1334633202, 1334633200, 1334633197, 1334633191, 1334633184, 1334633177, 1334632915, 1334632912, 1334632908]} ##### 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.01455545425415039 #### 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 Tue Feb 4 19:54:57 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 (20225220) 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 : 20225220 get user id for portfolio 20225220 get sub ptf for main ptf 20225220, type 3726 and hashtags ['Carton_gris', 'kraft', 'Carton_brun', 'autre_refus', 'environnement', 'plastique', 'flou', 'Teint_Dans_La_Masse', 'papier', 'mal_croppe', 'cartonnette', 'metal'] 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`=20225220 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','kraft','Carton_brun','autre_refus','environnement','plastique','flou','Teint_Dans_La_Masse','papier','mal_croppe','cartonnette','metal')) 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`=20225220 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','kraft','Carton_brun','autre_refus','environnement','plastique','flou','Teint_Dans_La_Masse','papier','mal_croppe','cartonnette','metal')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 20225220, 'sub_port_id': 20225224, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927872, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'autre_refus': {'main_port_id': 20225220, 'sub_port_id': 20225225, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927873, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'kraft': {'main_port_id': 20225220, 'sub_port_id': 20225226, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927874, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'Carton_gris': {'main_port_id': 20225220, 'sub_port_id': 20225227, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927875, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'mal_croppe': {'main_port_id': 20225220, 'sub_port_id': 20225228, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927876, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 20225220, 'sub_port_id': 20225229, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927877, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'Carton_brun': {'main_port_id': 20225220, 'sub_port_id': 20225230, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927878, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'metal': {'main_port_id': 20225220, 'sub_port_id': 20225231, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927879, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'plastique': {'main_port_id': 20225220, 'sub_port_id': 20225232, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927880, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'environnement': {'main_port_id': 20225220, 'sub_port_id': 20225233, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927881, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'papier': {'main_port_id': 20225220, 'sub_port_id': 20225234, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927882, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'cartonnette': {'main_port_id': 20225220, 'sub_port_id': 20225235, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927883, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225224 , 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=20225220 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 (20225224) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225225 , 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=20225220 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 (20225225) result : ((1334633654,), (1334633655,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225226 , 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=20225220 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 (20225226) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225227 , 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=20225220 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 (20225227) result : ((1334633748,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225228 , 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=20225220 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 (20225228) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225229 , 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=20225220 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 (20225229) result : ((1334633711,), (1334633745,), (1334633746,), (1334633747,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225230 , 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=20225220 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 (20225230) result : ((1334633659,), (1334633751,), (1334633752,), (1334633753,), (1334633754,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225231 , 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=20225220 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 (20225231) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225232 , 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=20225220 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 (20225232) result : ((1334633755,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225233 , 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=20225220 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 (20225233) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225234 , 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=20225220 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 (20225234) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20225235 , 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=20225220 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 (20225235) result : ((1334633712,), (1334633749,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20225220) result : ((1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) 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 (1334633200) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20225220 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','kraft','Carton_brun','autre_refus','environnement','plastique','flou','Teint_Dans_La_Masse','papier','mal_croppe','cartonnette','metal')) 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`=20225220 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','kraft','Carton_brun','autre_refus','environnement','plastique','flou','Teint_Dans_La_Masse','papier','mal_croppe','cartonnette','metal')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 20225220, 'sub_port_id': 20225236, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927884, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'autre_refus': {'main_port_id': 20225220, 'sub_port_id': 20225237, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927885, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'kraft': {'main_port_id': 20225220, 'sub_port_id': 20225238, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927886, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'Carton_gris': {'main_port_id': 20225220, 'sub_port_id': 20225239, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927887, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'mal_croppe': {'main_port_id': 20225220, 'sub_port_id': 20225240, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927888, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 20225220, 'sub_port_id': 20225241, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927889, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'Carton_brun': {'main_port_id': 20225220, 'sub_port_id': 20225242, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927890, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'metal': {'main_port_id': 20225220, 'sub_port_id': 20225243, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927891, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'plastique': {'main_port_id': 20225220, 'sub_port_id': 20225244, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927892, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'environnement': {'main_port_id': 20225220, 'sub_port_id': 20225245, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927893, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'papier': {'main_port_id': 20225220, 'sub_port_id': 20225246, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927894, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}, 'cartonnette': {'main_port_id': 20225220, 'sub_port_id': 20225247, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12927895, 'last_updated_at': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 4, 19, 52, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 4, 19, 48, 57)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225236,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225224 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225237,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225225 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225238,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225226 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225239,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225227 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225240,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225228 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225241,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225229 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225242,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225230 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225243,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225231 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225244,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225232 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225245,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225233 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225246,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225234 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20225247,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20225235 lien utilise dans velours : https://www.fotonower.com/velours/20225236,20225237,20225238,20225239,20225240,20225241,20225242,20225243,20225244,20225245,20225246,20225247?tags=flou,autre_refus,kraft,Carton_gris,mal_croppe,Teint_Dans_La_Masse,Carton_brun,metal,plastique,environnement,papier,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20225220]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721] map_info['map_portfolio_photo'] : {20225220: [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721, 1334633697, 1334633694, 1334633691, 1334633673, 1334633670, 1334633665, 1334633660, 1334633652, 1334633648, 1334633629, 1334633625, 1334633622, 1334633590, 1334633587, 1334633473, 1334633469, 1334633467, 1334633384, 1334633380, 1334633376, 1334633312, 1334633297, 1334633202, 1334633200, 1334633197, 1334633191, 1334633184, 1334633177, 1334632915, 1334632912, 1334632908]} final : False mtd_id 4302 list_pids : [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721] Looping around the photos to save general results len do output : 1 /20225220. 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, '2547139') ('4302', '20225220', '1334633741', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633733', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633728', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633727', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633723', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633721', None, None, None, None, None, '2547139') 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, '20225220', "{'flou': 20225224, 'autre_refus': 20225225, 'kraft': 20225226, 'Carton_gris': 20225227, 'mal_croppe': 20225228, 'Teint_Dans_La_Masse': 20225229, 'Carton_brun': 20225230, 'metal': 20225231, 'plastique': 20225232, 'environnement': 20225233, 'papier': 20225234, 'cartonnette': 20225235}", None, None, None, None, '2547139'), ('4302', '20225220', '1334633741', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633733', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633728', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633727', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633723', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633721', None, None, None, None, None, '2547139')] time used for this insertion : 0.013737678527832031 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5086665153503418 time spend to save output : 0.013996362686157227 total time spend for step 1 : 0.522662878036499 step2:final Tue Feb 4 19:54:57 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 (20225220) 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 20225220 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1334632915,1334632912,1334632908,1334633202,1334633200,1334633197,1334633191,1334633184,1334633177,1334633384,1334633380,1334633376,1334633312,1334633297,1334633473,1334633469,1334633467,1334633629,1334633625,1334633622,1334633590,1334633587,1334633673,1334633670,1334633665,1334633660,1334633652,1334633648,1334633697,1334633694,1334633691,1334633741,1334633733,1334633728,1334633727,1334633723,1334633721); 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([20225220]) Inside saveOutput : final : False verbose : True original output for save of step final : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ('0.03307425509082957',), 1334633721: ('0.03307425509082957',)} new output for save of step final : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ('0.03307425509082957',), 1334633721: ('0.03307425509082957',)} [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721] map_info['map_portfolio_photo'] : {20225220: [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721, 1334633697, 1334633694, 1334633691, 1334633673, 1334633670, 1334633665, 1334633660, 1334633652, 1334633648, 1334633629, 1334633625, 1334633622, 1334633590, 1334633587, 1334633473, 1334633469, 1334633467, 1334633384, 1334633380, 1334633376, 1334633312, 1334633297, 1334633202, 1334633200, 1334633197, 1334633191, 1334633184, 1334633177, 1334632915, 1334632912, 1334632908]} final : False mtd_id 4302 list_pids : [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721] Looping around the photos to save general results len do output : 6 /1334633741.Didn't retrieve data . /1334633733.Didn't retrieve data . /1334633728.Didn't retrieve data . /1334633727.Didn't retrieve data . /1334633723.Didn't retrieve data . /1334633721.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, '2547139') ('4302', '20225220', '1334633741', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633733', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633728', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633727', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633723', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633721', None, None, None, None, None, '2547139') 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', '20225220', '1334633741', '0.03307425509082957', None, None, None, None, '2547139'), ('4302', '20225220', '1334633733', '0.03307425509082957', None, None, None, None, '2547139'), ('4302', '20225220', '1334633728', '0.03307425509082957', None, None, None, None, '2547139'), ('4302', '20225220', '1334633727', '0.03307425509082957', None, None, None, None, '2547139'), ('4302', '20225220', '1334633723', '0.03307425509082957', None, None, None, None, '2547139'), ('4302', '20225220', '1334633721', '0.03307425509082957', None, None, None, None, '2547139')] time used for this insertion : 0.01452183723449707 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06909775733947754 time spend to save output : 0.014964103698730469 total time spend for step 2 : 0.08406186103820801 step3:velours_tree Tue Feb 4 19:54:57 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 : {20225220: [{'flou': 20225224, 'autre_refus': 20225225, 'kraft': 20225226, 'Carton_gris': 20225227, 'mal_croppe': 20225228, 'Teint_Dans_La_Masse': 20225229, 'Carton_brun': 20225230, 'metal': 20225231, 'plastique': 20225232, 'environnement': 20225233, 'papier': 20225234, 'cartonnette': 20225235}]} input_args_next_step : {20225220: ()} output_args : {20225220: [{'flou': 20225224, 'autre_refus': 20225225, 'kraft': 20225226, 'Carton_gris': 20225227, 'mal_croppe': 20225228, 'Teint_Dans_La_Masse': 20225229, 'Carton_brun': 20225230, 'metal': 20225231, 'plastique': 20225232, 'environnement': 20225233, 'papier': 20225234, 'cartonnette': 20225235}]} args : 20225220 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 : ({'flou': 20225224, 'autre_refus': 20225225, 'kraft': 20225226, 'Carton_gris': 20225227, 'mal_croppe': 20225228, 'Teint_Dans_La_Masse': 20225229, 'Carton_brun': 20225230, 'metal': 20225231, 'plastique': 20225232, 'environnement': 20225233, 'papier': 20225234, 'cartonnette': 20225235},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20225220) 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([20225220]) 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.2954401969909668 time spend to save output : 3.910064697265625e-05 total time spend for step 3 : 0.29547929763793945 step4:send_mail_cod Tue Feb 4 19:54:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ('0.03307425509082957',), 1334633721: ('0.03307425509082957',)} input_args_next_step : {1334633741: ()} output_args : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ('0.03307425509082957',), 1334633721: ('0.03307425509082957',)} args : 1334633741 depend.output_id : 0 input_args_next_step : {1334633741: ('0.03307425509082957',), 1334633733: ()} output_args : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ('0.03307425509082957',), 1334633721: ('0.03307425509082957',)} args : 1334633733 depend.output_id : 0 input_args_next_step : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ()} output_args : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ('0.03307425509082957',), 1334633721: ('0.03307425509082957',)} args : 1334633728 depend.output_id : 0 input_args_next_step : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ()} output_args : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ('0.03307425509082957',), 1334633721: ('0.03307425509082957',)} args : 1334633727 depend.output_id : 0 input_args_next_step : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ()} output_args : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ('0.03307425509082957',), 1334633721: ('0.03307425509082957',)} args : 1334633723 depend.output_id : 0 input_args_next_step : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ('0.03307425509082957',), 1334633721: ()} output_args : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ('0.03307425509082957',), 1334633721: ('0.03307425509082957',)} args : 1334633721 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 : {20225220: [{'flou': 20225224, 'autre_refus': 20225225, 'kraft': 20225226, 'Carton_gris': 20225227, 'mal_croppe': 20225228, 'Teint_Dans_La_Masse': 20225229, 'Carton_brun': 20225230, 'metal': 20225231, 'plastique': 20225232, 'environnement': 20225233, 'papier': 20225234, 'cartonnette': 20225235}]} input_args_next_step : {1334633741: ('0.03307425509082957',), 1334633733: ('0.03307425509082957',), 1334633728: ('0.03307425509082957',), 1334633727: ('0.03307425509082957',), 1334633723: ('0.03307425509082957',), 1334633721: ('0.03307425509082957',), 20225220: ()} output_args : {20225220: [{'flou': 20225224, 'autre_refus': 20225225, 'kraft': 20225226, 'Carton_gris': 20225227, 'mal_croppe': 20225228, 'Teint_Dans_La_Masse': 20225229, 'Carton_brun': 20225230, 'metal': 20225231, 'plastique': 20225232, 'environnement': 20225233, 'papier': 20225234, 'cartonnette': 20225235}]} args : 20225220 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.03307425509082957',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20225220) 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 (1334633741,1334633733,1334633728,1334633727,1334633723,1334633721) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1334633721 begin to download photo : 1334633727 begin to download photo : 1334633733 download finish for photo 1334633721 begin to download photo : 1334633723 download finish for photo 1334633727 begin to download photo : 1334633728 download finish for photo 1334633733 begin to download photo : 1334633741 download finish for photo 1334633728 download finish for photo 1334633741 download finish for photo 1334633723 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette202252241738695298/ length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P20225220_04-02-2025_19_54_58.pdf 20225224 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=20225224 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202252241738695298 20225225 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=20225225 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1334633654: '1738695013_1522401_1334633202_8ce22f3344e8391b04bebfeecf7cc23c_rle_crop_3654032924_0.png', 1334633655: '1738695013_1522401_1334633202_8ce22f3344e8391b04bebfeecf7cc23c_rle_crop_3654032920_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/32418a7226662cf767dd71ba4d6bf9a5_17032137.png change filename to text .imagette202252251738695298/ imagette202252251738695298/1738695013_1522401_1334633202_8ce22f3344e8391b04bebfeecf7cc23c_rle_crop_3654032920_0.png.png imagette202252251738695298/1738695013_1522401_1334633202_8ce22f3344e8391b04bebfeecf7cc23c_rle_crop_3654032924_0.png.png imagette202252261738695298/ imagette202252281738695298/ imagette202252311738695298/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/2a95fa71054505c178d70105d3ad690a_89528659.png imagette202252251738695298 20225226 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=20225226 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202252261738695298 20225228 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=20225228 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202252281738695298 20225231 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=20225231 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202252311738695298 20225232 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=20225232 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1334633755: '1738695114_1523641_1334633473_d0f71fe805dbada523d17b800e3dd268_rle_crop_3654044554_0.png'} change filename to text .imagette202252321738695298/ imagette202252321738695298/1738695114_1523641_1334633473_d0f71fe805dbada523d17b800e3dd268_rle_crop_3654044554_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/089d5ff22b3cb774c5c2caabcf3354f4_1443007.png imagette202252321738695298 20225235 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=20225235 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1334633712: '1738695093_1523445_1334633469_378636c13c197bbc737b0f570084bdda_rle_crop_3654042024_0.png', 1334633749: '1738695114_1523641_1334633473_d0f71fe805dbada523d17b800e3dd268_rle_crop_3654044557_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/6e579f690320974440dc007cc1342de5_90079755.png change filename to text .imagette202252351738695298/ imagette202252351738695298/1738695093_1523445_1334633469_378636c13c197bbc737b0f570084bdda_rle_crop_3654042024_0.png.png imagette202252351738695298/1738695114_1523641_1334633473_d0f71fe805dbada523d17b800e3dd268_rle_crop_3654044557_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/15e3cb83a2baef6ad5dd7238068e24a5_70174077.png imagette202252351738695298 20225227 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=20225227 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1334633748: '1738695114_1523641_1334633297_45d30d641b4530246c8a7e020b72403a_rle_crop_3654045404_0.png'} change filename to text .imagette202252271738695298/ imagette202252271738695298/1738695114_1523641_1334633297_45d30d641b4530246c8a7e020b72403a_rle_crop_3654045404_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/f6e53d02bdf67771e4c5a0cce7d24d8f_35699419.png imagette202252271738695298 20225229 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=20225229 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1334633711: '1738695093_1523445_1334633469_378636c13c197bbc737b0f570084bdda_rle_crop_3654042028_0.png', 1334633745: '1738695114_1523641_1334633380_e064fa5ceae86f1bdc7abf2784e0e684_rle_crop_3654044834_0.png', 1334633746: '1738695114_1523641_1334633376_2c238849cb0b3fb8d69fb31dd73bb664_rle_crop_3654044871_0.png', 1334633747: '1738695114_1523641_1334633312_4b89e801744a5fba7684ae906fc6f9a2_rle_crop_3654045140_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/76d46f71df3702a75d4126f26c6383cb_460876.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/24b0b0c845e713054f0b238db734f250_68324922.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/e370c3c8a8759c480d3d892f8dbc5767_56525857.png change filename to text .imagette202252291738695298/ imagette202252291738695298/1738695114_1523641_1334633380_e064fa5ceae86f1bdc7abf2784e0e684_rle_crop_3654044834_0.png.png imagette202252291738695298/1738695114_1523641_1334633376_2c238849cb0b3fb8d69fb31dd73bb664_rle_crop_3654044871_0.png.png imagette202252291738695298/1738695114_1523641_1334633312_4b89e801744a5fba7684ae906fc6f9a2_rle_crop_3654045140_0.png.png imagette202252291738695298/1738695093_1523445_1334633469_378636c13c197bbc737b0f570084bdda_rle_crop_3654042028_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/1ad5dd24bed729afaf276c63e2e3ef4b_14606164.png imagette202252291738695298 20225230 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=20225230 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1334633659: '1738695013_1522401_1334633202_8ce22f3344e8391b04bebfeecf7cc23c_rle_crop_3654032923_0.png', 1334633751: '1738695114_1523641_1334633473_d0f71fe805dbada523d17b800e3dd268_rle_crop_3654044559_0.png', 1334633752: '1738695114_1523641_1334633380_e064fa5ceae86f1bdc7abf2784e0e684_rle_crop_3654044830_0.png', 1334633753: '1738695114_1523641_1334633376_2c238849cb0b3fb8d69fb31dd73bb664_rle_crop_3654044872_0.png', 1334633754: '1738695114_1523641_1334633312_4b89e801744a5fba7684ae906fc6f9a2_rle_crop_3654045144_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/5e60f32d7583ba2729d7442c68fbe002_5307024.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/53a97da36bcedeac518bfc20b87bd3da_88695934.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/d437d17a99f91f283aa62a56aba387ed_29302847.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/e32756eccc02f67adb0b1a1a64ab6f4b_73776382.png change filename to text .imagette202252301738695299/ imagette202252301738695299/1738695114_1523641_1334633376_2c238849cb0b3fb8d69fb31dd73bb664_rle_crop_3654044872_0.png.png imagette202252301738695299/1738695114_1523641_1334633473_d0f71fe805dbada523d17b800e3dd268_rle_crop_3654044559_0.png.png imagette202252301738695299/1738695114_1523641_1334633380_e064fa5ceae86f1bdc7abf2784e0e684_rle_crop_3654044830_0.png.png imagette202252301738695299/1738695013_1522401_1334633202_8ce22f3344e8391b04bebfeecf7cc23c_rle_crop_3654032923_0.png.png imagette202252301738695299/1738695114_1523641_1334633312_4b89e801744a5fba7684ae906fc6f9a2_rle_crop_3654045144_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/ca33b10979a2cae0d4b9ff894bee4db9_18178686.png imagette202252301738695299 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20225220 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20225236,20225237,20225238,20225239,20225240,20225241,20225242,20225243,20225244,20225245,20225246,20225247?tags=flou,autre_refus,kraft,Carton_gris,mal_croppe,Teint_Dans_La_Masse,Carton_brun,metal,plastique,environnement,papier,cartonnette your option no_mail is active, we will not send the real mail to your client args[1334633741] : ('0.03307425509082957',) no score found for photo 1334633741 We are sending mail with results at report@fotonower.com args[1334633733] : ('0.03307425509082957',) no score found for photo 1334633733 We are sending mail with results at report@fotonower.com args[1334633728] : ('0.03307425509082957',) no score found for photo 1334633728 We are sending mail with results at report@fotonower.com args[1334633727] : ('0.03307425509082957',) no score found for photo 1334633727 We are sending mail with results at report@fotonower.com args[1334633723] : ('0.03307425509082957',) no score found for photo 1334633723 We are sending mail with results at report@fotonower.com args[1334633721] : ('0.03307425509082957',) no score found for photo 1334633721 We are sending mail with results at report@fotonower.com refus_total : 0.03307425509082957 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=20225220 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_P20225220_04-02-2025_19_54_58.pdf results_Auto_P20225220_04-02-2025_19_54_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20225220_04-02-2025_19_54_58.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','20225220','results_Auto_P20225220_04-02-2025_19_54_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20225220_04-02-2025_19_54_58.pdf','pdf','','0.12','0.03307425509082957') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20225220]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721] map_info['map_portfolio_photo'] : {20225220: [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721, 1334633697, 1334633694, 1334633691, 1334633673, 1334633670, 1334633665, 1334633660, 1334633652, 1334633648, 1334633629, 1334633625, 1334633622, 1334633590, 1334633587, 1334633473, 1334633469, 1334633467, 1334633384, 1334633380, 1334633376, 1334633312, 1334633297, 1334633202, 1334633200, 1334633197, 1334633191, 1334633184, 1334633177, 1334632915, 1334632912, 1334632908]} final : False mtd_id 4302 list_pids : [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721] 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, '2547139') ('4302', '20225220', '1334633741', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633733', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633728', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633727', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633723', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633721', None, None, None, None, None, '2547139') 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', '20225220', '1334633741', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633733', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633728', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633727', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633723', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633721', None, None, None, None, None, '2547139')] time used for this insertion : 0.013926267623901367 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.9902775287628174 time spend to save output : 0.014171123504638672 total time spend for step 4 : 2.004448652267456 step5:split_time_score Tue Feb 4 19:55:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['20225220'] 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 : [('20225220',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20225220) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1334633727: {'path': 'temp/1738695298_810080_1334633727_278845d62b834abbf962e743f0e9559e.jpg', 'extension': 'jpg'}, 1334633728: {'path': 'temp/1738695298_810080_1334633728_bc4084efd1b1378b8fffd299337db4e9.jpg', 'extension': 'jpg'}, 1334633733: {'path': 'temp/1738695298_810080_1334633733_e84127b55eea3946fdd25111f7f14883.jpg', 'extension': 'jpg'}, 1334633741: {'path': 'temp/1738695298_810080_1334633741_80687b74b217ff15cf725ab6f6c9d1b5.jpg', 'extension': 'jpg'}, 1334633721: {'path': 'temp/1738695298_810080_1334633721_f34c4336f1008073977c43c38096667d.jpg', 'extension': 'jpg'}, 1334633723: {'path': 'temp/1738695298_810080_1334633723_663c2b24ac22f4466e132e0c8761813f.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 = 20225220; (('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 = 20225220 group by h (('19', 37),) 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=20225220 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 (20225220) 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 (20225220) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 04022025 20225220 Nombre de photos uploadées : 37 / 23040 (0%) 04022025 20225220 Nombre de photos taguées (types de déchets): 0 / 37 (0%) 04022025 20225220 Nombre de photos taguées (volume) : 0 / 37 (0%) [{'photo_id': 1334632915, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/851da09341796ecd753e5afc1c8846a3.jpg', 'username': None, 'uploaded_at': 1738694767, 'text': 'image_04022025_19_45_05_10155.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1334632912, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/37401cc1abb0cd44b1de31d155f3c142.jpg', 'username': None, 'uploaded_at': 1738694767, 'text': 'image_04022025_19_45_14_9122.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1334632908, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/5bee2b19f85195231c7cb902883447f0.jpg', 'username': None, 'uploaded_at': 1738694767, 'text': 'image_04022025_19_45_44_10138.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1334633202, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/4/8ce22f3344e8391b04bebfeecf7cc23c.jpg', 'username': None, 'uploaded_at': 1738694827, 'text': 'image_04022025_19_45_54_10136.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 7.152557373046875e-06 ????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0017597675323486328 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20225220, '2025-02-04' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1575286,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03025364875793457 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= 1575286 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1575286, 'dashboard_run_id': 1585199, 'mtr_portfolio_id': 20222746, 'dashboard_result_id': 8687246, '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_P20222746_04-02-2025_19_16_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20222815, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20222816, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20222817, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20222818, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20222819, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20222820, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20222821, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20222822, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20222823, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20222824, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20222825, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20222826, 'pht': 3726}}"}, {'dashboat_entry_day': 1575286, 'dashboard_run_id': 1585199, 'mtr_portfolio_id': 20223512, 'dashboard_result_id': 8687247, '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_P20223512_04-02-2025_19_33_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20223568, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20223569, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20223570, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20223571, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20223572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20223573, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20223574, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20223575, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20223576, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20223577, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20223578, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20223579, 'pht': 3726}}"}, {'dashboat_entry_day': 1575286, 'dashboard_run_id': 1585199, 'mtr_portfolio_id': 20224457, 'dashboard_result_id': 8687248, '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_P20224457_04-02-2025_19_46_56.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20224499, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20224500, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20224501, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20224502, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20224503, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20224504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20224505, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20224506, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20224507, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20224508, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20224509, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20224510, 'pht': 3726}}"}, {'dashboat_entry_day': 1575286, 'dashboard_run_id': 1585199, 'mtr_portfolio_id': 20225220, 'dashboard_result_id': 8687249, '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_P20225220_04-02-2025_19_52_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20225224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20225225, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20225226, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20225227, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20225228, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20225229, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20225230, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20225231, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20225232, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20225233, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20225234, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20225235, '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 = 20222746 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': 2546890, 'mtr_portfolio_id': 20222746, 'created_at': datetime.datetime(2025, 2, 4, 19, 16, 57), 'result': '0.06140528025411868', 'result_long': None, 'result_double': None}] Qualite : 0.06140528025411868 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20222746 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20222746_04-02-2025_19_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20222746 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_P20222746_04-02-2025_19_16_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20222815, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20222816, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20222817, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20222818, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20222819, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20222820, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20222821, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20222822, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20222823, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20222824, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20222825, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20222826, 'pht': 3726}}" where mtr_portfolio_id = 20222746 and dashboard_run_id = 1585199 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`=20222746 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8687246, 0.06140528025411868, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20222746_04-02-2025_19_16_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20222815, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20222816, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20222817, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20222818, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20222819, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20222820, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20222821, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20222822, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20222823, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20222824, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20222825, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20222826, '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 = 20223512 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': 2547017, 'mtr_portfolio_id': 20223512, 'created_at': datetime.datetime(2025, 2, 4, 19, 33), 'result': '0.04283688118345528', 'result_long': None, 'result_double': None}] Qualite : 0.04283688118345528 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20223512 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20223512_04-02-2025_19_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20223512 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_P20223512_04-02-2025_19_33_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20223568, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20223569, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20223570, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20223571, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20223572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20223573, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20223574, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20223575, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20223576, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20223577, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20223578, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20223579, 'pht': 3726}}" where mtr_portfolio_id = 20223512 and dashboard_run_id = 1585199 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`=20223512 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8687247, 0.04283688118345528, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20223512_04-02-2025_19_33_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20223568, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20223569, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20223570, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20223571, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20223572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20223573, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20223574, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20223575, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20223576, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20223577, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20223578, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20223579, '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 = 20224457 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': 2547090, 'mtr_portfolio_id': 20224457, 'created_at': datetime.datetime(2025, 2, 4, 19, 46, 56), 'result': '0.06538809418647462', 'result_long': None, 'result_double': None}] Qualite : 0.06538809418647462 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20224457 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20224457_04-02-2025_19_46_56.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20224457 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_P20224457_04-02-2025_19_46_56.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20224499, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20224500, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20224501, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20224502, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20224503, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20224504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20224505, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20224506, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20224507, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20224508, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20224509, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20224510, 'pht': 3726}}" where mtr_portfolio_id = 20224457 and dashboard_run_id = 1585199 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`=20224457 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8687248, 0.06538809418647462, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20224457_04-02-2025_19_46_56.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20224499, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20224500, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20224501, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20224502, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20224503, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20224504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20224505, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20224506, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20224507, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20224508, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20224509, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20224510, '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 = 20225220 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': 2547139, 'mtr_portfolio_id': 20225220, 'created_at': datetime.datetime(2025, 2, 4, 19, 54, 57), 'result': '0.03307425509082957', 'result_long': None, 'result_double': None}] Qualite : 0.03307425509082957 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20225220 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20225220_04-02-2025_19_54_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20225220 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_P20225220_04-02-2025_19_54_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20225224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20225225, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20225226, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20225227, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20225228, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20225229, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20225230, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20225231, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20225232, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20225233, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20225234, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20225235, 'pht': 3726}}" where mtr_portfolio_id = 20225220 and dashboard_run_id = 1585199 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`=20225220 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8687249, 0.03307425509082957, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20225220_04-02-2025_19_54_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20225224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20225225, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20225226, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20225227, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20225228, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20225229, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20225230, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20225231, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20225232, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20225233, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20225234, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20225235, '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 (20222746,20223512,20224457,20225220) result : ((1334622425,), (1334622432,), (1334622435,), (1334622440,), (1334622682,), (1334622711,), (1334623152,), (1334623166,), (1334623169,), (1334623172,), (1334623175,), (1334623177,), (1334623209,), (1334623212,), (1334623214,), (1334623216,), (1334623259,), (1334623261,), (1334623263,), (1334623264,), (1334623270,), (1334623275,), (1334623301,), (1334623307,), (1334623314,), (1334623317,), (1334623390,), (1334623447,), (1334623497,), (1334623573,), (1334623652,), (1334623660,), (1334623943,), (1334623944,), (1334623970,), (1334623972,), (1334624084,), (1334624092,), (1334624095,), (1334624097,), (1334624100,), (1334624103,), (1334624130,), (1334624145,), (1334624151,), (1334624160,), (1334624174,), (1334624281,), (1334624301,), (1334624322,), (1334624326,), (1334624329,), (1334624545,), (1334624579,), (1334624581,), (1334624591,), (1334624625,), (1334624628,), (1334624650,), (1334624651,), (1334624652,), (1334624713,), (1334624715,), (1334624718,), (1334624721,), (1334624723,), (1334624749,), (1334624803,), (1334624805,), (1334624808,), (1334624824,), (1334624832,), (1334624872,), (1334624947,), (1334624933,), (1334624935,), (1334624942,), (1334625084,), (1334625086,), (1334625089,), (1334625094,), (1334625107,), (1334625111,), (1334625157,), (1334625160,), (1334625344,), (1334625345,), (1334625983,), (1334625986,), (1334625994,), (1334626023,), (1334626287,), (1334626293,), (1334626299,), (1334626305,), (1334626306,), (1334626308,), (1334627460,), (1334627498,), (1334627595,), (1334627635,), (1334627696,), (1334627706,), (1334627880,), (1334627885,), (1334627889,), (1334628310,), (1334628313,), (1334628317,), (1334628320,), (1334628323,), (1334628362,), (1334628388,), (1334628390,), (1334628425,), (1334628429,), (1334628562,), (1334628564,), (1334628567,), (1334628570,), (1334628615,), (1334628620,), (1334628628,), (1334628629,), (1334628634,), (1334628636,), (1334629010,), (1334629076,), (1334629143,), (1334629188,), (1334629572,), (1334629588,), (1334629650,), (1334629713,), (1334629760,), (1334629763,), (1334630006,), (1334630077,), (1334630089,), (1334630111,), (1334630221,), (1334630202,), (1334630204,), (1334630206,), (1334630212,), (1334630218,), (1334630349,), (1334630402,), (1334630407,), (1334630829,), (1334630861,), (1334630864,), (1334630866,), (1334630867,), (1334630869,), (1334630980,), (1334630983,), (1334630987,), (1334630990,), (1334630993,), (1334631057,), (1334631062,), (1334631067,), (1334631072,), (1334631075,), (1334631092,), (1334631096,), (1334631099,), (1334631103,), (1334631107,), (1334631112,), (1334631364,), (1334631435,), (1334631447,), (1334631700,), (1334631702,), (1334631751,), (1334631754,), (1334631757,), (1334631761,), (1334631950,), (1334631953,), (1334631971,), (1334632029,), (1334632093,), (1334632095,), (1334632098,), (1334632101,), (1334632103,), (1334632106,), (1334632136,), (1334632145,), (1334632149,), (1334632152,), (1334632155,), (1334632157,), (1334632185,), (1334632188,), (1334632190,), (1334632193,), (1334632280,), (1334632290,), (1334632292,), (1334632296,), (1334632303,), (1334632335,), (1334632354,), (1334632362,), (1334632364,), (1334632368,), (1334632851,), (1334632929,), (1334632908,), (1334632912,), (1334632915,), (1334633177,), (1334633184,), (1334633191,), (1334633197,), (1334633200,), (1334633202,), (1334633297,), (1334633312,), (1334633376,), (1334633380,), (1334633384,), (1334633467,), (1334633469,), (1334633473,), (1334633587,), (1334633590,), (1334633622,), (1334633625,), (1334633629,), (1334633648,), (1334633652,), (1334633660,), (1334633665,), (1334633670,), (1334633673,), (1334633691,), (1334633694,), (1334633697,), (1334633721,), (1334633723,), (1334633727,), (1334633728,), (1334633733,), (1334633741,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'04022025': {'nb_upload': 37, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20225220]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721] map_info['map_portfolio_photo'] : {20225220: [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721, 1334633697, 1334633694, 1334633691, 1334633673, 1334633670, 1334633665, 1334633660, 1334633652, 1334633648, 1334633629, 1334633625, 1334633622, 1334633590, 1334633587, 1334633473, 1334633469, 1334633467, 1334633384, 1334633380, 1334633376, 1334633312, 1334633297, 1334633202, 1334633200, 1334633197, 1334633191, 1334633184, 1334633177, 1334632915, 1334632912, 1334632908]} final : True mtd_id 4302 list_pids : [1334633741, 1334633733, 1334633728, 1334633727, 1334633723, 1334633721] Looping around the photos to save general results len do output : 1 /20225220Didn'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, '2547139') ('4302', '20225220', '1334633741', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633733', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633728', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633727', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633723', None, None, None, None, None, '2547139') ('4302', None, None, None, None, None, None, None, '2547139') ('4302', '20225220', '1334633721', None, None, None, None, None, '2547139') 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, '20225220', 'None', None, None, None, None, '2547139'), ('4302', '20225220', '1334633741', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633733', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633728', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633727', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633723', None, None, None, None, None, '2547139'), ('4302', '20225220', '1334633721', None, None, None, None, None, '2547139')] time used for this insertion : 0.01721501350402832 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.35862255096435547 time spend to save output : 0.017401695251464844 total time spend for step 5 : 0.3760242462158203 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 (2547139) 1.87user 2.40system 0:05.78elapsed 74%CPU (0avgtext+0avgdata 159136maxresident)k 176inputs+6360outputs (1major+63948minor)pagefaults 0swaps