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 : 3249833 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 (2962109) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2962109) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366405 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2962109'] with mtr_portfolio_ids : ['23366405'] and first list_photo_ids : [] new path : /proc/3249833/ Name: python3 Umask: 0002 State: R (running) Tgid: 3249833 Ngid: 0 Pid: 3249833 PPid: 3249832 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3249833 NSpid: 3249833 NSpgid: 3247883 NSsid: 3247883 VmPeak: 1107324 kB VmSize: 1107324 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99888 kB VmRSS: 99888 kB RssAnon: 60212 kB RssFile: 39676 kB RssShmem: 0 kB VmData: 866072 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 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: 52 nonvoluntary_ctxt_switches: 87 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3249833', 'Ngid': '0', 'Pid': '3249833', 'PPid': '3249832', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3249833', 'NSpid': '3249833', 'NSpgid': '3247883', 'NSsid': '3247883', 'VmPeak': '1107324 kB', 'VmSize': '1107324 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99888 kB', 'VmRSS': '99888 kB', 'RssAnon': '60212 kB', 'RssFile': '39676 kB', 'RssShmem': '0 kB', 'VmData': '866072 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 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': '52', 'nonvoluntary_ctxt_switches': '87'} ('datou_batch_current', '3249833', '1107324', '0', '1107324', '866072', '99888', b'', 'marlene', '2962109') 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 (23366405) 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 (2962109 ) ) 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 (23366405) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1361219183, 'portfolio_id': 23366405}, {'photo_id': 1361218558, 'portfolio_id': 23366405}, {'photo_id': 1361218385, 'portfolio_id': 23366405}, {'photo_id': 1361217157, 'portfolio_id': 23366405}, {'photo_id': 1361217142, 'portfolio_id': 23366405}, {'photo_id': 1361217138, 'portfolio_id': 23366405}, {'photo_id': 1361217134, 'portfolio_id': 23366405}, {'photo_id': 1361217120, 'portfolio_id': 23366405}, {'photo_id': 1361217094, 'portfolio_id': 23366405}, {'photo_id': 1361216767, 'portfolio_id': 23366405}, {'photo_id': 1361216737, 'portfolio_id': 23366405}, {'photo_id': 1361216712, 'portfolio_id': 23366405}, {'photo_id': 1361216464, 'portfolio_id': 23366405}, {'photo_id': 1361216433, 'portfolio_id': 23366405}, {'photo_id': 1361216403, 'portfolio_id': 23366405}, {'photo_id': 1361216367, 'portfolio_id': 23366405}, {'photo_id': 1361216337, 'portfolio_id': 23366405}, {'photo_id': 1361216304, 'portfolio_id': 23366405}, {'photo_id': 1361216038, 'portfolio_id': 23366405}, {'photo_id': 1361216012, 'portfolio_id': 23366405}, {'photo_id': 1361215981, 'portfolio_id': 23366405}, {'photo_id': 1361215953, 'portfolio_id': 23366405}, {'photo_id': 1361215928, 'portfolio_id': 23366405}, {'photo_id': 1361215899, 'portfolio_id': 23366405}, {'photo_id': 1361215586, 'portfolio_id': 23366405}, {'photo_id': 1361215556, 'portfolio_id': 23366405}, {'photo_id': 1361215550, 'portfolio_id': 23366405}, {'photo_id': 1361215543, 'portfolio_id': 23366405}, {'photo_id': 1361215530, 'portfolio_id': 23366405}, {'photo_id': 1361215527, 'portfolio_id': 23366405}, {'photo_id': 1361215523, 'portfolio_id': 23366405}, {'photo_id': 1361215303, 'portfolio_id': 23366405}, {'photo_id': 1361215134, 'portfolio_id': 23366405}, {'photo_id': 1361215130, 'portfolio_id': 23366405}, {'photo_id': 1361215127, 'portfolio_id': 23366405}, {'photo_id': 1361215119, 'portfolio_id': 23366405}, {'photo_id': 1361215094, 'portfolio_id': 23366405}, {'photo_id': 1361214890, 'portfolio_id': 23366405}, {'photo_id': 1361214887, 'portfolio_id': 23366405}, {'photo_id': 1361214885, 'portfolio_id': 23366405}, {'photo_id': 1361214882, 'portfolio_id': 23366405}, {'photo_id': 1361214879, 'portfolio_id': 23366405}, {'photo_id': 1361214862, 'portfolio_id': 23366405}, {'photo_id': 1361214859, 'portfolio_id': 23366405}, {'photo_id': 1361214857, 'portfolio_id': 23366405}] map_portfolio_id_photo_id: {23366405: [1361219183, 1361218558, 1361218385, 1361217157, 1361217142, 1361217138, 1361217134, 1361217120, 1361217094, 1361216767, 1361216737, 1361216712, 1361216464, 1361216433, 1361216403, 1361216367, 1361216337, 1361216304, 1361216038, 1361216012, 1361215981, 1361215953, 1361215928, 1361215899, 1361215586, 1361215556, 1361215550, 1361215543, 1361215530, 1361215527, 1361215523, 1361215303, 1361215134, 1361215130, 1361215127, 1361215119, 1361215094, 1361214890, 1361214887, 1361214885, 1361214882, 1361214879, 1361214862, 1361214859, 1361214857]} ##### 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.014566183090209961 #### 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 May 27 07:02:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23366405) 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 : 23366405 get user id for portfolio 23366405 get sub ptf for main ptf 23366405, type 3726 and hashtags ['Carton_brun', 'plastique', 'autre_refus', 'environnement', 'papier', 'Teint_Dans_La_Masse', 'Carton_gris', 'metal', 'cartonnette', 'mal_croppe', 'kraft', 'flou'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=23366405 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','plastique','autre_refus','environnement','papier','Teint_Dans_La_Masse','Carton_gris','metal','cartonnette','mal_croppe','kraft','flou')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=23366405 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','plastique','autre_refus','environnement','papier','Teint_Dans_La_Masse','Carton_gris','metal','cartonnette','mal_croppe','kraft','flou')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 23366405, 'sub_port_id': 23366418, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587674, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}, 'plastique': {'main_port_id': 23366405, 'sub_port_id': 23366419, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587675, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}, 'flou': {'main_port_id': 23366405, 'sub_port_id': 23366420, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587676, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}, 'environnement': {'main_port_id': 23366405, 'sub_port_id': 23366421, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587677, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}, 'papier': {'main_port_id': 23366405, 'sub_port_id': 23366422, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587678, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}, 'metal': {'main_port_id': 23366405, 'sub_port_id': 23366423, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587679, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}, 'Teint_Dans_La_Masse': {'main_port_id': 23366405, 'sub_port_id': 23366424, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587680, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}, 'Carton_gris': {'main_port_id': 23366405, 'sub_port_id': 23366425, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587681, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}, 'mal_croppe': {'main_port_id': 23366405, 'sub_port_id': 23366426, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587682, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}, 'kraft': {'main_port_id': 23366405, 'sub_port_id': 23366427, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587683, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}, 'Carton_brun': {'main_port_id': 23366405, 'sub_port_id': 23366429, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587684, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}, 'cartonnette': {'main_port_id': 23366405, 'sub_port_id': 23366430, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587685, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 26)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366418 , 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=23366405 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 (23366418) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366419 , 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=23366405 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 (23366419) result : ((1361215493,), (1361217921,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366420 , 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=23366405 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 (23366420) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366421 , 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=23366405 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 (23366421) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366422 , 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=23366405 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 (23366422) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366423 , 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=23366405 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 (23366423) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366424 , 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=23366405 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 (23366424) result : ((1361215490,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366425 , 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=23366405 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 (23366425) result : ((1361217912,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366426 , 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=23366405 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 (23366426) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366427 , 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=23366405 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 (23366427) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366429 , 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=23366405 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 (23366429) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23366430 , 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=23366405 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 (23366430) result : ((1361215492,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23366405) result : ((1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=23366405 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','plastique','autre_refus','environnement','papier','Teint_Dans_La_Masse','Carton_gris','metal','cartonnette','mal_croppe','kraft','flou')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=23366405 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','plastique','autre_refus','environnement','papier','Teint_Dans_La_Masse','Carton_gris','metal','cartonnette','mal_croppe','kraft','flou')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 23366405, 'sub_port_id': 23366432, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587686, 'last_updated_at': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}, 'plastique': {'main_port_id': 23366405, 'sub_port_id': 23366433, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587687, 'last_updated_at': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}, 'flou': {'main_port_id': 23366405, 'sub_port_id': 23366434, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587688, 'last_updated_at': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}, 'environnement': {'main_port_id': 23366405, 'sub_port_id': 23366435, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587689, 'last_updated_at': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}, 'papier': {'main_port_id': 23366405, 'sub_port_id': 23366436, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587690, 'last_updated_at': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}, 'metal': {'main_port_id': 23366405, 'sub_port_id': 23366437, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587691, 'last_updated_at': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}, 'Teint_Dans_La_Masse': {'main_port_id': 23366405, 'sub_port_id': 23366438, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587692, 'last_updated_at': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}, 'Carton_gris': {'main_port_id': 23366405, 'sub_port_id': 23366439, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587693, 'last_updated_at': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}, 'mal_croppe': {'main_port_id': 23366405, 'sub_port_id': 23366440, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587694, 'last_updated_at': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}, 'kraft': {'main_port_id': 23366405, 'sub_port_id': 23366441, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587695, 'last_updated_at': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}, 'Carton_brun': {'main_port_id': 23366405, 'sub_port_id': 23366442, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587696, 'last_updated_at': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 6, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}, 'cartonnette': {'main_port_id': 23366405, 'sub_port_id': 23366443, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15587697, 'last_updated_at': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 27, 7, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 27, 6, 47, 32)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366432,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366418 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366433,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366419 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366434,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366420 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366435,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366421 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366436,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366422 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366437,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366423 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366438,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366424 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366439,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366425 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366440,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366426 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366441,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366427 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366442,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366429 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23366443,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23366430 lien utilise dans velours : https://www.fotonower.com/velours/23366432,23366433,23366434,23366435,23366436,23366437,23366438,23366439,23366440,23366441,23366442,23366443?tags=autre_refus,plastique,flou,environnement,papier,metal,Teint_Dans_La_Masse,Carton_gris,mal_croppe,kraft,Carton_brun,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23366405]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1361219183] map_info['map_portfolio_photo'] : {23366405: [1361219183, 1361218558, 1361218385, 1361217157, 1361217142, 1361217138, 1361217134, 1361217120, 1361217094, 1361216767, 1361216737, 1361216712, 1361216464, 1361216433, 1361216403, 1361216367, 1361216337, 1361216304, 1361216038, 1361216012, 1361215981, 1361215953, 1361215928, 1361215899, 1361215586, 1361215556, 1361215550, 1361215543, 1361215530, 1361215527, 1361215523, 1361215303, 1361215134, 1361215130, 1361215127, 1361215119, 1361215094, 1361214890, 1361214887, 1361214885, 1361214882, 1361214879, 1361214862, 1361214859, 1361214857]} final : False mtd_id 4302 list_pids : [1361219183] Looping around the photos to save general results len do output : 1 /23366405. 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, '2962109') ('4302', '23366405', '1361219183', None, None, None, None, None, '2962109') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '23366405', "{'autre_refus': 23366418, 'plastique': 23366419, 'flou': 23366420, 'environnement': 23366421, 'papier': 23366422, 'metal': 23366423, 'Teint_Dans_La_Masse': 23366424, 'Carton_gris': 23366425, 'mal_croppe': 23366426, 'kraft': 23366427, 'Carton_brun': 23366429, 'cartonnette': 23366430}", None, None, None, None, '2962109'), ('4302', '23366405', '1361219183', None, None, None, None, None, '2962109')] time used for this insertion : 0.012888669967651367 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.3926806449890137 time spend to save output : 0.013120174407958984 total time spend for step 1 : 1.4058008193969727 step2:final Tue May 27 07:03:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23366405) 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 23366405 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1361214862,1361214859,1361214857,1361214890,1361214887,1361214885,1361214882,1361214879,1361215134,1361215130,1361215127,1361215119,1361215094,1361215530,1361215303,1361215527,1361215523,1361215586,1361215556,1361215550,1361215543,1361216038,1361216012,1361215981,1361215953,1361215928,1361215899,1361216464,1361216433,1361216403,1361216367,1361216337,1361216304,1361216767,1361216737,1361216712,1361217142,1361217138,1361217134,1361217120,1361217094,1361217157,1361218558,1361218385,1361219183); 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([23366405]) Inside saveOutput : final : False verbose : True original output for save of step final : {1361219183: ('0.06886596649535763',)} new output for save of step final : {1361219183: ('0.06886596649535763',)} [1361219183] map_info['map_portfolio_photo'] : {23366405: [1361219183, 1361218558, 1361218385, 1361217157, 1361217142, 1361217138, 1361217134, 1361217120, 1361217094, 1361216767, 1361216737, 1361216712, 1361216464, 1361216433, 1361216403, 1361216367, 1361216337, 1361216304, 1361216038, 1361216012, 1361215981, 1361215953, 1361215928, 1361215899, 1361215586, 1361215556, 1361215550, 1361215543, 1361215530, 1361215527, 1361215523, 1361215303, 1361215134, 1361215130, 1361215127, 1361215119, 1361215094, 1361214890, 1361214887, 1361214885, 1361214882, 1361214879, 1361214862, 1361214859, 1361214857]} final : False mtd_id 4302 list_pids : [1361219183] Looping around the photos to save general results len do output : 1 /1361219183.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, '2962109') ('4302', '23366405', '1361219183', None, None, None, None, None, '2962109') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '23366405', '1361219183', '0.06886596649535763', None, None, None, None, '2962109')] time used for this insertion : 0.011165380477905273 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06254839897155762 time spend to save output : 0.011334657669067383 total time spend for step 2 : 0.073883056640625 step3:velours_tree Tue May 27 07:03: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 : {23366405: [{'autre_refus': 23366418, 'plastique': 23366419, 'flou': 23366420, 'environnement': 23366421, 'papier': 23366422, 'metal': 23366423, 'Teint_Dans_La_Masse': 23366424, 'Carton_gris': 23366425, 'mal_croppe': 23366426, 'kraft': 23366427, 'Carton_brun': 23366429, 'cartonnette': 23366430}]} input_args_next_step : {23366405: ()} output_args : {23366405: [{'autre_refus': 23366418, 'plastique': 23366419, 'flou': 23366420, 'environnement': 23366421, 'papier': 23366422, 'metal': 23366423, 'Teint_Dans_La_Masse': 23366424, 'Carton_gris': 23366425, 'mal_croppe': 23366426, 'kraft': 23366427, 'Carton_brun': 23366429, 'cartonnette': 23366430}]} args : 23366405 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 : ({'autre_refus': 23366418, 'plastique': 23366419, 'flou': 23366420, 'environnement': 23366421, 'papier': 23366422, 'metal': 23366423, 'Teint_Dans_La_Masse': 23366424, 'Carton_gris': 23366425, 'mal_croppe': 23366426, 'kraft': 23366427, 'Carton_brun': 23366429, 'cartonnette': 23366430},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23366405) 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([23366405]) 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.3272898197174072 time spend to save output : 7.772445678710938e-05 total time spend for step 3 : 0.32736754417419434 step4:send_mail_cod Tue May 27 07:03:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1361219183: ('0.06886596649535763',)} input_args_next_step : {1361219183: ()} output_args : {1361219183: ('0.06886596649535763',)} args : 1361219183 depend.output_id : 0 complete output_args for input 3 : {23366405: [{'autre_refus': 23366418, 'plastique': 23366419, 'flou': 23366420, 'environnement': 23366421, 'papier': 23366422, 'metal': 23366423, 'Teint_Dans_La_Masse': 23366424, 'Carton_gris': 23366425, 'mal_croppe': 23366426, 'kraft': 23366427, 'Carton_brun': 23366429, 'cartonnette': 23366430}]} input_args_next_step : {1361219183: ('0.06886596649535763',), 23366405: ()} output_args : {23366405: [{'autre_refus': 23366418, 'plastique': 23366419, 'flou': 23366420, 'environnement': 23366421, 'papier': 23366422, 'metal': 23366423, 'Teint_Dans_La_Masse': 23366424, 'Carton_gris': 23366425, 'mal_croppe': 23366426, 'kraft': 23366427, 'Carton_brun': 23366429, 'cartonnette': 23366430}]} args : 23366405 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :2, first value : ('0.06886596649535763',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23366405) 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 (1361219183) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1361219183 download finish for photo 1361219183 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette233664181748322180/ length of list_filenames : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P23366405_27-05-2025_07_03_00.pdf 23366418 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=23366418 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette233664181748322180 23366419 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=23366419 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361215493: '1748321426_2852131_1361214879_b1898ac1a16618edce05ede7c877319c_rle_crop_3813750630_0.png', 1361217921: '1748321907_2863568_1361216712_7006fe5e61af78577cd534c2be55f309_rle_crop_3813763796_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/27/f401d3135d9b7fba2d7afe1f271b4981_71448826.png change filename to text .imagette233664191748322180/ imagette233664191748322180/1748321426_2852131_1361214879_b1898ac1a16618edce05ede7c877319c_rle_crop_3813750630_0.png.png imagette233664191748322180/1748321907_2863568_1361216712_7006fe5e61af78577cd534c2be55f309_rle_crop_3813763796_0.png.png imagette233664201748322180/ imagette233664231748322180/ imagette233664261748322180/ imagette233664271748322180/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/27/e7479fa9e95dabad526b8fc7500cff95_21767144.png imagette233664191748322180 23366420 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=23366420 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette233664201748322180 23366423 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=23366423 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette233664231748322180 23366426 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=23366426 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette233664261748322180 23366427 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=23366427 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette233664271748322180 23366430 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=23366430 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361215492: '1748321426_2852131_1361214882_db81ddc383a7b1e34fff0cfd51ba087a_rle_crop_3813750608_0.png'} change filename to text .imagette233664301748322180/ imagette233664301748322180/1748321426_2852131_1361214882_db81ddc383a7b1e34fff0cfd51ba087a_rle_crop_3813750608_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/27/9e8a26bccd063bcd368f15d57feb9d40_88897601.png imagette233664301748322180 23366424 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=23366424 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361215490: '1748321426_2852131_1361214879_b1898ac1a16618edce05ede7c877319c_rle_crop_3813750624_0.png'} change filename to text .imagette233664241748322180/ imagette233664241748322180/1748321426_2852131_1361214879_b1898ac1a16618edce05ede7c877319c_rle_crop_3813750624_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/27/d5d6d661f28e2ca7914f085aabcf71e4_91528521.png imagette233664241748322180 23366425 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=23366425 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361217912: '1748321907_2863568_1361216712_7006fe5e61af78577cd534c2be55f309_rle_crop_3813763789_0.png'} change filename to text .imagette233664251748322180/ imagette233664251748322180/1748321907_2863568_1361216712_7006fe5e61af78577cd534c2be55f309_rle_crop_3813763789_0.png.png imagette233664291748322180/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/27/a608b68d6cbd7216ce967bb4a3e7163d_52680417.png imagette233664251748322180 23366429 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=23366429 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette233664291748322180 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=23366405 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/23366432,23366433,23366434,23366435,23366436,23366437,23366438,23366439,23366440,23366441,23366442,23366443?tags=autre_refus,plastique,flou,environnement,papier,metal,Teint_Dans_La_Masse,Carton_gris,mal_croppe,kraft,Carton_brun,cartonnette your option no_mail is active, we will not send the real mail to your client args[1361219183] : ('0.06886596649535763',) no score found for photo 1361219183 We are sending mail with results at report@fotonower.com refus_total : 0.06886596649535763 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=23366405 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_P23366405_27-05-2025_07_03_00.pdf results_Auto_P23366405_27-05-2025_07_03_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23366405_27-05-2025_07_03_00.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','23366405','results_Auto_P23366405_27-05-2025_07_03_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23366405_27-05-2025_07_03_00.pdf','pdf','','0.06','0.06886596649535763') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23366405]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1361219183] map_info['map_portfolio_photo'] : {23366405: [1361219183, 1361218558, 1361218385, 1361217157, 1361217142, 1361217138, 1361217134, 1361217120, 1361217094, 1361216767, 1361216737, 1361216712, 1361216464, 1361216433, 1361216403, 1361216367, 1361216337, 1361216304, 1361216038, 1361216012, 1361215981, 1361215953, 1361215928, 1361215899, 1361215586, 1361215556, 1361215550, 1361215543, 1361215530, 1361215527, 1361215523, 1361215303, 1361215134, 1361215130, 1361215127, 1361215119, 1361215094, 1361214890, 1361214887, 1361214885, 1361214882, 1361214879, 1361214862, 1361214859, 1361214857]} final : False mtd_id 4302 list_pids : [1361219183] 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, '2962109') ('4302', '23366405', '1361219183', None, None, None, None, None, '2962109') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '23366405', '1361219183', None, None, None, None, None, '2962109')] time used for this insertion : 0.014475822448730469 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5749361515045166 time spend to save output : 0.014624834060668945 total time spend for step 4 : 1.5895609855651855 step5:split_time_score Tue May 27 07:03:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['23366405'] 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 : [('23366405',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23366405) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1361219183: {'path': 'temp/1748322180_3249833_1361219183_b5f48197a36dc32bdf6215783e63de9b.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 = 23366405; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('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 = 23366405 group by h (('06', 45),) 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=23366405 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 (23366405) 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 (23366405) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 27052025 23366405 Nombre de photos uploadées : 45 / 23040 (0%) 27052025 23366405 Nombre de photos taguées (types de déchets): 0 / 45 (0%) 27052025 23366405 Nombre de photos taguées (volume) : 0 / 45 (0%) [{'photo_id': 1361214862, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/27/09c9fb9b3488fc47370ad83f1f577659.jpg', 'username': None, 'uploaded_at': 1748321167, 'text': 'image_27052025_06_45_04_9146.jpg'}, {'photo_id': 1361214859, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/27/d3217c1a2a91fab224d4ab10e31e41e0.jpg', 'username': None, 'uploaded_at': 1748321167, 'text': 'image_27052025_06_45_14_10139.jpg'}, {'photo_id': 1361214857, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/27/860d9f832f3ff118e8145b78c73e0def.jpg', 'username': None, 'uploaded_at': 1748321167, 'text': 'image_27052025_06_45_24_10136.jpg'}, {'photo_id': 1361214890, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/27/ec288b732e7d3a82acf477631f3b9488.jpg', 'username': None, 'uploaded_at': 1748321227, 'text': 'image_27052025_06_45_34_10144.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.001928567886352539 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 23366405, '2025-05-27' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1837719,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02904510498046875 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= 1837719 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1837719, 'dashboard_run_id': 1846019, 'mtr_portfolio_id': 23360575, 'dashboard_result_id': 10933783, '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_P23360575_27-05-2025_06_09_29.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23360577, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23360578, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23360579, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23360580, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23360581, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23360582, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23360583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23360584, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23360585, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23360586, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23360587, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23360588, 'pht': 3726}}"}, {'dashboat_entry_day': 1837719, 'dashboard_run_id': 1846019, 'mtr_portfolio_id': 23363233, 'dashboard_result_id': 10933784, '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_P23363233_27-05-2025_06_10_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23363234, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23363235, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23363236, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23363237, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23363238, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23363239, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23363240, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23363241, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23363242, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23363243, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23363244, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23363245, 'pht': 3726}}"}, {'dashboat_entry_day': 1837719, 'dashboard_run_id': 1846019, 'mtr_portfolio_id': 23364430, 'dashboard_result_id': 10933785, '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_P23364430_27-05-2025_06_10_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23364455, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23364456, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23364457, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23364458, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23364459, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23364460, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23364461, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23364462, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23364463, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23364464, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23364465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23364466, 'pht': 3726}}"}, {'dashboat_entry_day': 1837719, 'dashboard_run_id': 1846019, 'mtr_portfolio_id': 23364644, 'dashboard_result_id': 10933786, '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_P23364644_27-05-2025_06_11_30.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23364646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23364647, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23364648, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23364649, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23364650, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23364651, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23364652, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23364653, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23364654, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23364655, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23364656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23364657, 'pht': 3726}}"}, {'dashboat_entry_day': 1837719, 'dashboard_run_id': 1846019, 'mtr_portfolio_id': 23364943, 'dashboard_result_id': 10933787, '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_P23364943_27-05-2025_05_49_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23364944, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23364945, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23364946, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23364947, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23364948, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23364949, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23364950, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23364951, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23364952, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23364953, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23364954, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23364955, 'pht': 3726}}"}, {'dashboat_entry_day': 1837719, 'dashboard_run_id': 1846019, 'mtr_portfolio_id': 23365280, 'dashboard_result_id': 10933788, '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_P23365280_27-05-2025_06_03_30.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23365317, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23365318, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23365319, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23365320, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23365321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23365322, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23365323, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23365324, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23365325, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23365326, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23365327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23365328, 'pht': 3726}}"}, {'dashboat_entry_day': 1837719, 'dashboard_run_id': 1846019, 'mtr_portfolio_id': 23365499, 'dashboard_result_id': 10933789, '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_P23365499_27-05-2025_06_16_30.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23365504, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23365505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23365506, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23365507, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23365508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23365509, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23365510, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23365511, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23365512, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23365513, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23365514, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23365515, 'pht': 3726}}"}, {'dashboat_entry_day': 1837719, 'dashboard_run_id': 1846019, 'mtr_portfolio_id': 23365879, 'dashboard_result_id': 10933790, '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_P23365879_27-05-2025_06_32_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23365886, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23365887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23365888, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23365889, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23365890, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23365891, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23365892, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23365893, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23365894, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23365895, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23365896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23365897, 'pht': 3726}}"}, {'dashboat_entry_day': 1837719, 'dashboard_run_id': 1846019, 'mtr_portfolio_id': 23366127, 'dashboard_result_id': 10933791, '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_P23366127_27-05-2025_06_47_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23366136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23366137, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23366138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23366139, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23366140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23366141, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23366142, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23366143, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23366144, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23366145, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23366146, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23366147, 'pht': 3726}}"}, {'dashboat_entry_day': 1837719, 'dashboard_run_id': 1846019, 'mtr_portfolio_id': 23366405, 'dashboard_result_id': 10933792, '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_P23366405_27-05-2025_07_00_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23366418, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23366419, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23366420, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23366421, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23366422, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23366423, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23366424, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23366425, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23366426, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23366427, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23366429, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23366430, '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 = 23360575 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': 2961754, 'mtr_portfolio_id': 23360575, 'created_at': datetime.datetime(2025, 5, 27, 6, 9, 28), 'result': '0.1234835479789914', 'result_long': None, 'result_double': None}] Qualite : 0.1234835479789914 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23360575 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23360575_27-05-2025_06_09_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23360575 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_P23360575_27-05-2025_06_09_29.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23360577, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23360578, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23360579, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23360580, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23360581, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23360582, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23360583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23360584, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23360585, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23360586, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23360587, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23360588, 'pht': 3726}}" where mtr_portfolio_id = 23360575 and dashboard_run_id = 1846019 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`=23360575 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10933783, 0.1234835479789914, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23360575_27-05-2025_06_09_29.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23360577, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23360578, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23360579, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23360580, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23360581, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23360582, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23360583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23360584, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23360585, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23360586, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23360587, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23360588, '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 = 23363233 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': 2961755, 'mtr_portfolio_id': 23363233, 'created_at': datetime.datetime(2025, 5, 27, 6, 10), 'result': '0.049981317891323276', 'result_long': None, 'result_double': None}] Qualite : 0.049981317891323276 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23363233 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23363233_27-05-2025_06_10_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23363233 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_P23363233_27-05-2025_06_10_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23363234, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23363235, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23363236, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23363237, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23363238, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23363239, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23363240, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23363241, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23363242, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23363243, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23363244, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23363245, 'pht': 3726}}" where mtr_portfolio_id = 23363233 and dashboard_run_id = 1846019 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`=23363233 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10933784, 0.049981317891323276, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23363233_27-05-2025_06_10_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23363234, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23363235, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23363236, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23363237, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23363238, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23363239, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23363240, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23363241, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23363242, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23363243, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23363244, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23363245, '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 = 23364430 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': 2961756, 'mtr_portfolio_id': 23364430, 'created_at': datetime.datetime(2025, 5, 27, 6, 10, 28), 'result': '0.0409221154453971', 'result_long': None, 'result_double': None}] Qualite : 0.0409221154453971 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23364430 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23364430_27-05-2025_06_10_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23364430 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_P23364430_27-05-2025_06_10_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23364455, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23364456, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23364457, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23364458, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23364459, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23364460, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23364461, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23364462, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23364463, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23364464, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23364465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23364466, 'pht': 3726}}" where mtr_portfolio_id = 23364430 and dashboard_run_id = 1846019 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`=23364430 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10933785, 0.0409221154453971, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23364430_27-05-2025_06_10_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23364455, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23364456, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23364457, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23364458, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23364459, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23364460, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23364461, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23364462, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23364463, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23364464, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23364465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23364466, '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 = 23364644 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': 2961757, 'mtr_portfolio_id': 23364644, 'created_at': datetime.datetime(2025, 5, 27, 6, 11, 29), 'result': '0.05081041669502847', 'result_long': None, 'result_double': None}] Qualite : 0.05081041669502847 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23364644 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23364644_27-05-2025_06_11_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23364644 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_P23364644_27-05-2025_06_11_30.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23364646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23364647, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23364648, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23364649, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23364650, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23364651, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23364652, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23364653, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23364654, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23364655, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23364656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23364657, 'pht': 3726}}" where mtr_portfolio_id = 23364644 and dashboard_run_id = 1846019 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`=23364644 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10933786, 0.05081041669502847, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23364644_27-05-2025_06_11_30.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23364646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23364647, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23364648, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23364649, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23364650, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23364651, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23364652, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23364653, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23364654, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23364655, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23364656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23364657, '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 = 23364943 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': 2961763, 'mtr_portfolio_id': 23364943, 'created_at': datetime.datetime(2025, 5, 27, 5, 49, 30), 'result': '0.057623003765354966', 'result_long': None, 'result_double': None}] Qualite : 0.057623003765354966 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23364943 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23364943_27-05-2025_05_49_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23364943 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_P23364943_27-05-2025_05_49_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23364944, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23364945, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23364946, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23364947, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23364948, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23364949, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23364950, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23364951, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23364952, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23364953, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23364954, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23364955, 'pht': 3726}}" where mtr_portfolio_id = 23364943 and dashboard_run_id = 1846019 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`=23364943 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10933787, 0.057623003765354966, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23364943_27-05-2025_05_49_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23364944, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23364945, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23364946, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23364947, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23364948, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23364949, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23364950, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23364951, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23364952, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23364953, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23364954, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23364955, '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 = 23365280 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': 2961786, 'mtr_portfolio_id': 23365280, 'created_at': datetime.datetime(2025, 5, 27, 6, 3, 30), 'result': '0.055547372776310666', 'result_long': None, 'result_double': None}] Qualite : 0.055547372776310666 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23365280 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23365280_27-05-2025_06_03_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23365280 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_P23365280_27-05-2025_06_03_30.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23365317, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23365318, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23365319, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23365320, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23365321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23365322, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23365323, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23365324, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23365325, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23365326, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23365327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23365328, 'pht': 3726}}" where mtr_portfolio_id = 23365280 and dashboard_run_id = 1846019 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`=23365280 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10933788, 0.055547372776310666, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23365280_27-05-2025_06_03_30.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23365317, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23365318, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23365319, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23365320, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23365321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23365322, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23365323, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23365324, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23365325, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23365326, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23365327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23365328, '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 = 23365499 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': 2961854, 'mtr_portfolio_id': 23365499, 'created_at': datetime.datetime(2025, 5, 27, 6, 16, 30), 'result': '0.0642922766973338', 'result_long': None, 'result_double': None}] Qualite : 0.0642922766973338 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23365499 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23365499_27-05-2025_06_16_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23365499 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_P23365499_27-05-2025_06_16_30.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23365504, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23365505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23365506, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23365507, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23365508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23365509, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23365510, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23365511, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23365512, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23365513, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23365514, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23365515, 'pht': 3726}}" where mtr_portfolio_id = 23365499 and dashboard_run_id = 1846019 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`=23365499 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10933789, 0.0642922766973338, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23365499_27-05-2025_06_16_30.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23365504, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23365505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23365506, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23365507, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23365508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23365509, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23365510, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23365511, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23365512, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23365513, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23365514, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23365515, '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 = 23365879 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': 2961941, 'mtr_portfolio_id': 23365879, 'created_at': datetime.datetime(2025, 5, 27, 6, 32, 59), 'result': '0.042681626082129054', 'result_long': None, 'result_double': None}] Qualite : 0.042681626082129054 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23365879 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23365879_27-05-2025_06_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23365879 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_P23365879_27-05-2025_06_32_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23365886, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23365887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23365888, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23365889, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23365890, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23365891, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23365892, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23365893, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23365894, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23365895, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23365896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23365897, 'pht': 3726}}" where mtr_portfolio_id = 23365879 and dashboard_run_id = 1846018 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`=23365879 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10933790, 0.042681626082129054, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23365879_27-05-2025_06_32_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23365886, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23365887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23365888, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23365889, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23365890, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23365891, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23365892, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23365893, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23365894, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23365895, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23365896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23365897, '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 = 23366127 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': 2962009, 'mtr_portfolio_id': 23366127, 'created_at': datetime.datetime(2025, 5, 27, 6, 46, 59), 'result': '0.03416169082599736', 'result_long': None, 'result_double': None}] Qualite : 0.03416169082599736 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23366127 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23366127_27-05-2025_06_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23366127 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_P23366127_27-05-2025_06_47_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23366136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23366137, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23366138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23366139, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23366140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23366141, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23366142, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23366143, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23366144, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23366145, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23366146, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23366147, 'pht': 3726}}" where mtr_portfolio_id = 23366127 and dashboard_run_id = 1846018 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`=23366127 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10933791, 0.03416169082599736, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23366127_27-05-2025_06_47_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23366136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23366137, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23366138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23366139, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23366140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23366141, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23366142, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23366143, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23366144, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23366145, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23366146, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23366147, '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 = 23366405 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': 2962109, 'mtr_portfolio_id': 23366405, 'created_at': datetime.datetime(2025, 5, 27, 7, 3), 'result': '0.06886596649535763', 'result_long': None, 'result_double': None}] Qualite : 0.06886596649535763 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23366405 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23366405_27-05-2025_07_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23366405 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_P23366405_27-05-2025_07_03_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23366418, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23366419, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23366420, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23366421, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23366422, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23366423, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23366424, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23366425, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23366426, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23366427, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23366429, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23366430, 'pht': 3726}}" where mtr_portfolio_id = 23366405 and dashboard_run_id = 1846018 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`=23366405 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10933792, 0.06886596649535763, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23366405_27-05-2025_07_03_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23366418, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23366419, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23366420, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23366421, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23366422, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23366423, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23366424, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23366425, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23366426, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23366427, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23366429, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23366430, '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 (23360575,23363233,23364430,23364644,23364943,23365280,23365499,23365879,23366127,23366405) result : ((1361175828,), (1361175894,), (1361175896,), (1361175897,), (1361175998,), (1361176782,), (1361177113,), (1361177123,), (1361180815,), (1361201120,), (1361201124,), (1361201160,), (1361201163,), (1361201250,), (1361201280,), (1361201283,), (1361202942,), (1361206468,), (1361206493,), (1361206556,), (1361206573,), (1361206589,), (1361206616,), (1361206619,), (1361206644,), (1361206683,), (1361206687,), (1361206754,), (1361206802,), (1361207028,), (1361207055,), (1361207064,), (1361207068,), (1361207222,), (1361207226,), (1361207230,), (1361207234,), (1361207279,), (1361207281,), (1361207648,), (1361207919,), (1361208128,), (1361209604,), (1361209633,), (1361209674,), (1361210118,), (1361210120,), (1361210140,), (1361210363,), (1361210532,), (1361210582,), (1361210698,), (1361210701,), (1361210703,), (1361211212,), (1361211090,), (1361211176,), (1361211201,), (1361211205,), (1361211306,), (1361211309,), (1361211334,), (1361211337,), (1361211364,), (1361211368,), (1361211371,), (1361211559,), (1361211567,), (1361211743,), (1361211746,), (1361211773,), (1361211978,), (1361212007,), (1361212035,), (1361212457,), (1361212405,), (1361212430,), (1361212873,), (1361212875,), (1361212878,), (1361213083,), (1361213107,), (1361213134,), (1361213164,), (1361213273,), (1361213275,), (1361213301,), (1361213327,), (1361213444,), (1361213446,), (1361213448,), (1361213451,), (1361213455,), (1361213644,), (1361213646,), (1361213648,), (1361213651,), (1361213654,), (1361213677,), (1361213680,), (1361213682,), (1361213684,), (1361213688,), (1361213702,), (1361213705,), (1361213708,), (1361213711,), (1361213717,), (1361213721,), (1361213747,), (1361213750,), (1361213753,), (1361213779,), (1361213781,), (1361213786,), (1361213790,), (1361213794,), (1361213805,), (1361213809,), (1361213811,), (1361213814,), (1361213818,), (1361213831,), (1361213856,), (1361213858,), (1361213917,), (1361213991,), (1361213994,), (1361214139,), (1361214171,), (1361214174,), (1361214176,), (1361214179,), (1361214181,), (1361214257,), (1361214261,), (1361214264,), (1361214292,), (1361214296,), (1361214301,), (1361214306,), (1361214310,), (1361214324,), (1361214327,), (1361214329,), (1361214332,), (1361214336,), (1361214340,), (1361214367,), (1361214369,), (1361214372,), (1361214376,), (1361214416,), (1361214402,), (1361214404,), (1361214406,), (1361214409,), (1361214413,), (1361214436,), (1361214443,), (1361214449,), (1361214453,), (1361214468,), (1361214469,), (1361214471,), (1361214475,), (1361214502,), (1361214505,), (1361214508,), (1361214510,), (1361214524,), (1361214528,), (1361214531,), (1361214552,), (1361214554,), (1361214557,), (1361214560,), (1361214565,), (1361214567,), (1361214580,), (1361214583,), (1361214585,), (1361214588,), (1361214590,), (1361214594,), (1361214607,), (1361214610,), (1361214613,), (1361214616,), (1361214621,), (1361214634,), (1361214637,), (1361214640,), (1361214644,), (1361214666,), (1361214668,), (1361214670,), (1361214672,), (1361214675,), (1361214688,), (1361214697,), (1361214700,), (1361214704,), (1361214707,), (1361214709,), (1361214728,), (1361214735,), (1361214740,), (1361214755,), (1361214758,), (1361214760,), (1361214762,), (1361214765,), (1361214791,), (1361214794,), (1361214797,), (1361214800,), (1361214805,), (1361214808,), (1361214822,), (1361214825,), (1361214828,), (1361214830,), (1361214864,), (1361214857,), (1361214859,), (1361214862,), (1361214879,), (1361214882,), (1361214885,), (1361214887,), (1361214890,), (1361215094,), (1361215119,), (1361215127,), (1361215130,), (1361215134,), (1361215303,), (1361215523,), (1361215527,), (1361215530,), (1361215543,), (1361215550,), (1361215556,), (1361215586,), (1361215899,), (1361215928,), (1361215953,), (1361215981,), (1361216012,), (1361216038,), (1361216304,), (1361216337,), (1361216367,), (1361216403,), (1361216433,), (1361216464,), (1361216712,), (1361216737,), (1361216767,), (1361217094,), (1361217120,), (1361217134,), (1361217138,), (1361217142,), (1361217157,), (1361218385,), (1361218558,), (1361219183,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'27052025': {'nb_upload': 45, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23366405]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1361219183] map_info['map_portfolio_photo'] : {23366405: [1361219183, 1361218558, 1361218385, 1361217157, 1361217142, 1361217138, 1361217134, 1361217120, 1361217094, 1361216767, 1361216737, 1361216712, 1361216464, 1361216433, 1361216403, 1361216367, 1361216337, 1361216304, 1361216038, 1361216012, 1361215981, 1361215953, 1361215928, 1361215899, 1361215586, 1361215556, 1361215550, 1361215543, 1361215530, 1361215527, 1361215523, 1361215303, 1361215134, 1361215130, 1361215127, 1361215119, 1361215094, 1361214890, 1361214887, 1361214885, 1361214882, 1361214879, 1361214862, 1361214859, 1361214857]} final : True mtd_id 4302 list_pids : [1361219183] Looping around the photos to save general results len do output : 1 /23366405Didn'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, '2962109') ('4302', '23366405', '1361219183', None, None, None, None, None, '2962109') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '23366405', 'None', None, None, None, None, '2962109'), ('4302', '23366405', '1361219183', None, None, None, None, None, '2962109')] time used for this insertion : 0.012895345687866211 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.8162193298339844 time spend to save output : 0.013052940368652344 total time spend for step 5 : 0.8292722702026367 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 (2962109) 1.69user 1.97system 0:07.00elapsed 52%CPU (0avgtext+0avgdata 156732maxresident)k 16inputs+2280outputs (3major+77323minor)pagefaults 0swaps