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 : 3057389 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 (2549490) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2549490) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248017 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2549490'] with mtr_portfolio_ids : ['20248017'] and first list_photo_ids : [] new path : /proc/3057389/ Name: python3 Umask: 0002 State: R (running) Tgid: 3057389 Ngid: 0 Pid: 3057389 PPid: 3057388 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3057389 NSpid: 3057389 NSpgid: 3054522 NSsid: 3054522 VmPeak: 1106660 kB VmSize: 1106660 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98504 kB VmRSS: 98504 kB RssAnon: 59736 kB RssFile: 38768 kB RssShmem: 0 kB VmData: 865412 kB VmStk: 132 kB VmExe: 2640 kB VmLib: 130468 kB VmPTE: 596 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 45 nonvoluntary_ctxt_switches: 87 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3057389', 'Ngid': '0', 'Pid': '3057389', 'PPid': '3057388', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3057389', 'NSpid': '3057389', 'NSpgid': '3054522', 'NSsid': '3054522', 'VmPeak': '1106660 kB', 'VmSize': '1106660 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98504 kB', 'VmRSS': '98504 kB', 'RssAnon': '59736 kB', 'RssFile': '38768 kB', 'RssShmem': '0 kB', 'VmData': '865412 kB', 'VmStk': '132 kB', 'VmExe': '2640 kB', 'VmLib': '130468 kB', 'VmPTE': '596 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '45', 'nonvoluntary_ctxt_switches': '87'} ('datou_batch_current', '3057389', '1106660', '0', '1106660', '865412', '98504', b'', 'marlene', '2549490') 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 (20248017) 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 (2549490 ) ) 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 (20248017) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1334852088, 'portfolio_id': 20248017}, {'photo_id': 1334852073, 'portfolio_id': 20248017}, {'photo_id': 1334852066, 'portfolio_id': 20248017}, {'photo_id': 1334852061, 'portfolio_id': 20248017}, {'photo_id': 1334851918, 'portfolio_id': 20248017}, {'photo_id': 1334851917, 'portfolio_id': 20248017}, {'photo_id': 1334851915, 'portfolio_id': 20248017}, {'photo_id': 1334851908, 'portfolio_id': 20248017}, {'photo_id': 1334851864, 'portfolio_id': 20248017}, {'photo_id': 1334851709, 'portfolio_id': 20248017}, {'photo_id': 1334851669, 'portfolio_id': 20248017}, {'photo_id': 1334851532, 'portfolio_id': 20248017}, {'photo_id': 1334851521, 'portfolio_id': 20248017}, {'photo_id': 1334851469, 'portfolio_id': 20248017}, {'photo_id': 1334850901, 'portfolio_id': 20248017}, {'photo_id': 1334850887, 'portfolio_id': 20248017}, {'photo_id': 1334850884, 'portfolio_id': 20248017}, {'photo_id': 1334850569, 'portfolio_id': 20248017}, {'photo_id': 1334850562, 'portfolio_id': 20248017}, {'photo_id': 1334850558, 'portfolio_id': 20248017}, {'photo_id': 1334850556, 'portfolio_id': 20248017}, {'photo_id': 1334850551, 'portfolio_id': 20248017}, {'photo_id': 1334850547, 'portfolio_id': 20248017}, {'photo_id': 1334850449, 'portfolio_id': 20248017}, {'photo_id': 1334850447, 'portfolio_id': 20248017}, {'photo_id': 1334850445, 'portfolio_id': 20248017}, {'photo_id': 1334850443, 'portfolio_id': 20248017}, {'photo_id': 1334850426, 'portfolio_id': 20248017}] map_portfolio_id_photo_id: {20248017: [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864, 1334851709, 1334851669, 1334851532, 1334851521, 1334851469, 1334850901, 1334850887, 1334850884, 1334850569, 1334850562, 1334850558, 1334850556, 1334850551, 1334850547, 1334850449, 1334850447, 1334850445, 1334850443, 1334850426]} ##### 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.015044689178466797 #### 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 Wed Feb 5 08:52: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 (20248017) 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 : 20248017 get user id for portfolio 20248017 get sub ptf for main ptf 20248017, type 3726 and hashtags ['Carton_gris', 'Carton_brun', 'autre_refus', 'Teint_Dans_La_Masse', 'cartonnette', 'metal', 'kraft', 'plastique', 'mal_croppe', 'flou', 'environnement', 'papier'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20248017 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Carton_brun','autre_refus','Teint_Dans_La_Masse','cartonnette','metal','kraft','plastique','mal_croppe','flou','environnement','papier')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20248017 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Carton_brun','autre_refus','Teint_Dans_La_Masse','cartonnette','metal','kraft','plastique','mal_croppe','flou','environnement','papier')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 20248017, 'sub_port_id': 20248018, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948230, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}, 'autre_refus': {'main_port_id': 20248017, 'sub_port_id': 20248019, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948231, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}, 'Carton_brun': {'main_port_id': 20248017, 'sub_port_id': 20248020, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948232, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}, 'environnement': {'main_port_id': 20248017, 'sub_port_id': 20248021, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948233, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}, 'Carton_gris': {'main_port_id': 20248017, 'sub_port_id': 20248022, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948234, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}, 'mal_croppe': {'main_port_id': 20248017, 'sub_port_id': 20248023, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948235, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}, 'metal': {'main_port_id': 20248017, 'sub_port_id': 20248024, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948236, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}, 'papier': {'main_port_id': 20248017, 'sub_port_id': 20248025, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948237, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}, 'plastique': {'main_port_id': 20248017, 'sub_port_id': 20248026, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948238, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}, 'cartonnette': {'main_port_id': 20248017, 'sub_port_id': 20248027, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948239, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}, 'flou': {'main_port_id': 20248017, 'sub_port_id': 20248028, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948240, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}, 'kraft': {'main_port_id': 20248017, 'sub_port_id': 20248029, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948241, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 4)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20248018 , 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=20248017 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 (20248018) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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 20248019 , 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=20248017 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 (20248019) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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 20248020 , 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=20248017 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 (20248020) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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 20248021 , 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=20248017 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 (20248021) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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 20248022 , 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=20248017 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 (20248022) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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 20248023 , 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=20248017 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 (20248023) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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 20248024 , 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=20248017 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 (20248024) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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 20248025 , 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=20248017 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 (20248025) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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 20248026 , 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=20248017 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 (20248026) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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 20248027 , 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=20248017 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 (20248027) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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 20248028 , 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=20248017 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 (20248028) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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 20248029 , 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=20248017 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 (20248029) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20248017) result : ((1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) 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`=20248017 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Carton_brun','autre_refus','Teint_Dans_La_Masse','cartonnette','metal','kraft','plastique','mal_croppe','flou','environnement','papier')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20248017 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Carton_brun','autre_refus','Teint_Dans_La_Masse','cartonnette','metal','kraft','plastique','mal_croppe','flou','environnement','papier')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 20248017, 'sub_port_id': 20248030, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948242, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}, 'autre_refus': {'main_port_id': 20248017, 'sub_port_id': 20248031, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948243, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}, 'Carton_brun': {'main_port_id': 20248017, 'sub_port_id': 20248032, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948244, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}, 'environnement': {'main_port_id': 20248017, 'sub_port_id': 20248033, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948245, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}, 'Carton_gris': {'main_port_id': 20248017, 'sub_port_id': 20248034, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948246, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}, 'mal_croppe': {'main_port_id': 20248017, 'sub_port_id': 20248035, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948247, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}, 'metal': {'main_port_id': 20248017, 'sub_port_id': 20248036, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948248, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}, 'papier': {'main_port_id': 20248017, 'sub_port_id': 20248037, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948249, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}, 'plastique': {'main_port_id': 20248017, 'sub_port_id': 20248038, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948250, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}, 'cartonnette': {'main_port_id': 20248017, 'sub_port_id': 20248039, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948251, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}, 'flou': {'main_port_id': 20248017, 'sub_port_id': 20248040, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948252, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 49, 5), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}, 'kraft': {'main_port_id': 20248017, 'sub_port_id': 20248041, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 12948253, 'last_updated_at': datetime.datetime(2025, 2, 5, 8, 50, 31), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 8, 50, 31), 'last_updated_at_asc': datetime.datetime(2025, 2, 5, 8, 49, 5)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248030,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248018 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248031,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248019 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248032,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248020 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248033,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248021 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248034,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248022 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248035,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248023 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248036,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248024 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248037,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248025 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248038,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248026 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248039,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248027 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248040,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248028 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20248041,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20248029 lien utilise dans velours : https://www.fotonower.com/velours/20248030,20248031,20248032,20248033,20248034,20248035,20248036,20248037,20248038,20248039,20248040,20248041?tags=Teint_Dans_La_Masse,autre_refus,Carton_brun,environnement,Carton_gris,mal_croppe,metal,papier,plastique,cartonnette,flou,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20248017]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864] map_info['map_portfolio_photo'] : {20248017: [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864, 1334851709, 1334851669, 1334851532, 1334851521, 1334851469, 1334850901, 1334850887, 1334850884, 1334850569, 1334850562, 1334850558, 1334850556, 1334850551, 1334850547, 1334850449, 1334850447, 1334850445, 1334850443, 1334850426]} final : False mtd_id 4302 list_pids : [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864] Looping around the photos to save general results len do output : 1 /20248017. 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, '2549490') ('4302', '20248017', '1334852088', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852073', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852066', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852061', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851918', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851917', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851915', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851908', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851864', None, None, None, None, None, '2549490') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '20248017', "{'Teint_Dans_La_Masse': 20248018, 'autre_refus': 20248019, 'Carton_brun': 20248020, 'environnement': 20248021, 'Carton_gris': 20248022, 'mal_croppe': 20248023, 'metal': 20248024, 'papier': 20248025, 'plastique': 20248026, 'cartonnette': 20248027, 'flou': 20248028, 'kraft': 20248029}", None, None, None, None, '2549490'), ('4302', '20248017', '1334852088', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334852073', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334852066', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334852061', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851918', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851917', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851915', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851908', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851864', None, None, None, None, None, '2549490')] time used for this insertion : 1.3053786754608154 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4359431266784668 time spend to save output : 1.3056812286376953 total time spend for step 1 : 2.741624355316162 step2:final Wed Feb 5 08:53:01 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 (20248017) 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 20248017 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1334850449,1334850447,1334850445,1334850443,1334850426,1334850569,1334850562,1334850558,1334850556,1334850551,1334850547,1334850901,1334850887,1334850884,1334851709,1334851669,1334851532,1334851521,1334851469,1334851918,1334851917,1334851915,1334851908,1334851864,1334852088,1334852073,1334852066,1334852061); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20248017]) Inside saveOutput : final : False verbose : True original output for save of step final : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} new output for save of step final : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864] map_info['map_portfolio_photo'] : {20248017: [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864, 1334851709, 1334851669, 1334851532, 1334851521, 1334851469, 1334850901, 1334850887, 1334850884, 1334850569, 1334850562, 1334850558, 1334850556, 1334850551, 1334850547, 1334850449, 1334850447, 1334850445, 1334850443, 1334850426]} final : False mtd_id 4302 list_pids : [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864] Looping around the photos to save general results len do output : 9 /1334852088.Didn't retrieve data . /1334852073.Didn't retrieve data . /1334852066.Didn't retrieve data . /1334852061.Didn't retrieve data . /1334851918.Didn't retrieve data . /1334851917.Didn't retrieve data . /1334851915.Didn't retrieve data . /1334851908.Didn't retrieve data . /1334851864.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, '2549490') ('4302', '20248017', '1334852088', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852073', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852066', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852061', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851918', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851917', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851915', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851908', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851864', None, None, None, None, None, '2549490') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '20248017', '1334852088', '0.0', None, None, None, None, '2549490'), ('4302', '20248017', '1334852073', '0.0', None, None, None, None, '2549490'), ('4302', '20248017', '1334852066', '0.0', None, None, None, None, '2549490'), ('4302', '20248017', '1334852061', '0.0', None, None, None, None, '2549490'), ('4302', '20248017', '1334851918', '0.0', None, None, None, None, '2549490'), ('4302', '20248017', '1334851917', '0.0', None, None, None, None, '2549490'), ('4302', '20248017', '1334851915', '0.0', None, None, None, None, '2549490'), ('4302', '20248017', '1334851908', '0.0', None, None, None, None, '2549490'), ('4302', '20248017', '1334851864', '0.0', None, None, None, None, '2549490')] time used for this insertion : 0.012895345687866211 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.05111813545227051 time spend to save output : 0.013232707977294922 total time spend for step 2 : 0.06435084342956543 step3:velours_tree Wed Feb 5 08:53:01 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 : {20248017: [{'Teint_Dans_La_Masse': 20248018, 'autre_refus': 20248019, 'Carton_brun': 20248020, 'environnement': 20248021, 'Carton_gris': 20248022, 'mal_croppe': 20248023, 'metal': 20248024, 'papier': 20248025, 'plastique': 20248026, 'cartonnette': 20248027, 'flou': 20248028, 'kraft': 20248029}]} input_args_next_step : {20248017: ()} output_args : {20248017: [{'Teint_Dans_La_Masse': 20248018, 'autre_refus': 20248019, 'Carton_brun': 20248020, 'environnement': 20248021, 'Carton_gris': 20248022, 'mal_croppe': 20248023, 'metal': 20248024, 'papier': 20248025, 'plastique': 20248026, 'cartonnette': 20248027, 'flou': 20248028, 'kraft': 20248029}]} args : 20248017 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 : ({'Teint_Dans_La_Masse': 20248018, 'autre_refus': 20248019, 'Carton_brun': 20248020, 'environnement': 20248021, 'Carton_gris': 20248022, 'mal_croppe': 20248023, 'metal': 20248024, 'papier': 20248025, 'plastique': 20248026, 'cartonnette': 20248027, 'flou': 20248028, 'kraft': 20248029},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20248017) 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([20248017]) 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.3003847599029541 time spend to save output : 9.274482727050781e-05 total time spend for step 3 : 0.3004775047302246 step4:send_mail_cod Wed Feb 5 08:53:01 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 : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} input_args_next_step : {1334852088: ()} output_args : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} args : 1334852088 depend.output_id : 0 input_args_next_step : {1334852088: ('0.0',), 1334852073: ()} output_args : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} args : 1334852073 depend.output_id : 0 input_args_next_step : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ()} output_args : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} args : 1334852066 depend.output_id : 0 input_args_next_step : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ()} output_args : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} args : 1334852061 depend.output_id : 0 input_args_next_step : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ()} output_args : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} args : 1334851918 depend.output_id : 0 input_args_next_step : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ()} output_args : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} args : 1334851917 depend.output_id : 0 input_args_next_step : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ()} output_args : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} args : 1334851915 depend.output_id : 0 input_args_next_step : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ()} output_args : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} args : 1334851908 depend.output_id : 0 input_args_next_step : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ()} output_args : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',)} args : 1334851864 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {20248017: [{'Teint_Dans_La_Masse': 20248018, 'autre_refus': 20248019, 'Carton_brun': 20248020, 'environnement': 20248021, 'Carton_gris': 20248022, 'mal_croppe': 20248023, 'metal': 20248024, 'papier': 20248025, 'plastique': 20248026, 'cartonnette': 20248027, 'flou': 20248028, 'kraft': 20248029}]} input_args_next_step : {1334852088: ('0.0',), 1334852073: ('0.0',), 1334852066: ('0.0',), 1334852061: ('0.0',), 1334851918: ('0.0',), 1334851917: ('0.0',), 1334851915: ('0.0',), 1334851908: ('0.0',), 1334851864: ('0.0',), 20248017: ()} output_args : {20248017: [{'Teint_Dans_La_Masse': 20248018, 'autre_refus': 20248019, 'Carton_brun': 20248020, 'environnement': 20248021, 'Carton_gris': 20248022, 'mal_croppe': 20248023, 'metal': 20248024, 'papier': 20248025, 'plastique': 20248026, 'cartonnette': 20248027, 'flou': 20248028, 'kraft': 20248029}]} args : 20248017 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 :10, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20248017) 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 (1334852088,1334852073,1334852066,1334852061,1334851918,1334851917,1334851915,1334851908,1334851864) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1334851864 begin to download photo : 1334851915 begin to download photo : 1334851918 begin to download photo : 1334852066 begin to download photo : 1334852088 download finish for photo 1334851915 begin to download photo : 1334851917 download finish for photo 1334851864 begin to download photo : 1334851908 download finish for photo 1334852088 download finish for photo 1334852066 begin to download photo : 1334852073 download finish for photo 1334851918 begin to download photo : 1334852061 download finish for photo 1334852073 download finish for photo 1334851908 download finish for photo 1334851917 download finish for photo 1334852061 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette202480191738741981/ imagette202480231738741981/ imagette202480241738741981/ imagette202480261738741981/ imagette202480271738741981/ imagette202480281738741981/ imagette202480291738741981/ imagette202480181738741981/ imagette202480201738741981/ imagette202480221738741981/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P20248017_05-02-2025_08_53_01.pdf 20248019 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=20248019 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202480191738741981 20248023 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=20248023 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202480231738741981 20248024 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=20248024 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202480241738741981 20248026 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=20248026 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202480261738741981 20248027 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=20248027 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202480271738741981 20248028 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=20248028 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202480281738741981 20248029 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=20248029 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202480291738741981 20248018 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=20248018 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202480181738741981 20248020 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=20248020 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202480201738741981 20248022 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=20248022 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette202480221738741981 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20248017 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20248030,20248031,20248032,20248033,20248034,20248035,20248036,20248037,20248038,20248039,20248040,20248041?tags=Teint_Dans_La_Masse,autre_refus,Carton_brun,environnement,Carton_gris,mal_croppe,metal,papier,plastique,cartonnette,flou,kraft your option no_mail is active, we will not send the real mail to your client args[1334852088] : ('0.0',) no score found for photo 1334852088 We are sending mail with results at report@fotonower.com args[1334852073] : ('0.0',) no score found for photo 1334852073 We are sending mail with results at report@fotonower.com args[1334852066] : ('0.0',) no score found for photo 1334852066 We are sending mail with results at report@fotonower.com args[1334852061] : ('0.0',) no score found for photo 1334852061 We are sending mail with results at report@fotonower.com args[1334851918] : ('0.0',) no score found for photo 1334851918 We are sending mail with results at report@fotonower.com args[1334851917] : ('0.0',) no score found for photo 1334851917 We are sending mail with results at report@fotonower.com args[1334851915] : ('0.0',) no score found for photo 1334851915 We are sending mail with results at report@fotonower.com args[1334851908] : ('0.0',) no score found for photo 1334851908 We are sending mail with results at report@fotonower.com args[1334851864] : ('0.0',) no score found for photo 1334851864 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=20248017 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_P20248017_05-02-2025_08_53_01.pdf results_Auto_P20248017_05-02-2025_08_53_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20248017_05-02-2025_08_53_01.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','20248017','results_Auto_P20248017_05-02-2025_08_53_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20248017_05-02-2025_08_53_01.pdf','pdf','','0.09','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20248017]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864] map_info['map_portfolio_photo'] : {20248017: [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864, 1334851709, 1334851669, 1334851532, 1334851521, 1334851469, 1334850901, 1334850887, 1334850884, 1334850569, 1334850562, 1334850558, 1334850556, 1334850551, 1334850547, 1334850449, 1334850447, 1334850445, 1334850443, 1334850426]} final : False mtd_id 4302 list_pids : [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864] 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, '2549490') ('4302', '20248017', '1334852088', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852073', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852066', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852061', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851918', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851917', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851915', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851908', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851864', None, None, None, None, None, '2549490') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '20248017', '1334852088', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334852073', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334852066', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334852061', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851918', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851917', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851915', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851908', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851864', None, None, None, None, None, '2549490')] time used for this insertion : 0.012594223022460938 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.407222032546997 time spend to save output : 0.012844562530517578 total time spend for step 4 : 1.4200665950775146 step5:split_time_score Wed Feb 5 08:53:03 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 : ['20248017'] 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 : [('20248017',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20248017) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1334852088: {'path': 'temp/1738741981_3057389_1334852088_c88e5ae8b2bc5f27d5c6305c62d0dc5a.jpg', 'extension': 'jpg'}, 1334852066: {'path': 'temp/1738741981_3057389_1334852066_f43d706d53804ca332895551f8712af9.jpg', 'extension': 'jpg'}, 1334852073: {'path': 'temp/1738741981_3057389_1334852073_36c014401496653aac8d81fc1d00ec98.jpg', 'extension': 'jpg'}, 1334851864: {'path': 'temp/1738741981_3057389_1334851864_c97b6f8ca2bdf7d6b4afe2714f157da7.jpg', 'extension': 'jpg'}, 1334851908: {'path': 'temp/1738741981_3057389_1334851908_284c224aa0955bb4b5091694b6206bfd.jpg', 'extension': 'jpg'}, 1334851915: {'path': 'temp/1738741981_3057389_1334851915_150e9e027d14e01424c1704afc137f18.jpg', 'extension': 'jpg'}, 1334851917: {'path': 'temp/1738741981_3057389_1334851917_6c286c395e785c84f3a78d2dd1a375b3.jpg', 'extension': 'jpg'}, 1334851918: {'path': 'temp/1738741981_3057389_1334851918_d9f36e5f8d78bd38e35d64cca2318a1f.jpg', 'extension': 'jpg'}, 1334852061: {'path': 'temp/1738741981_3057389_1334852061_9a974997bb04e64d345e3c0838f84159.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 = 20248017; (('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 = 20248017 group by h (('08', 28),) 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=20248017 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 (20248017) 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 (20248017) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 05022025 20248017 Nombre de photos uploadées : 28 / 23040 (0%) 05022025 20248017 Nombre de photos taguées (types de déchets): 0 / 28 (0%) 05022025 20248017 Nombre de photos taguées (volume) : 0 / 28 (0%) [{'photo_id': 1334850449, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/5/f7110a637917c97a68419a345b040532.jpg', 'username': None, 'uploaded_at': 1738741567, 'text': 'image_05022025_08_45_04_9141.jpg'}, {'photo_id': 1334850447, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/5/46921c95bf2ff78c442032ab27a771fb.jpg', 'username': None, 'uploaded_at': 1738741567, 'text': 'image_05022025_08_45_14_10137.jpg'}, {'photo_id': 1334850445, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/5/a26d53d980b8c0c965c5984a0fc94fd9.jpg', 'username': None, 'uploaded_at': 1738741567, 'text': 'image_05022025_08_45_24_10139.jpg'}, {'photo_id': 1334850443, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/5/ec1de55da834c564ecb92f3d536bc88d.jpg', 'username': None, 'uploaded_at': 1738741567, 'text': 'image_05022025_08_45_34_10143.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.384185791015625e-06 elapsed_time : order_list_meta_photo_and_scores 6.67572021484375e-06 ???????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0014407634735107422 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20248017, '2025-02-05' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1578490,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02248692512512207 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= 1578490 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1578490, 'dashboard_run_id': 1586771, 'mtr_portfolio_id': 20246827, 'dashboard_result_id': 8701724, '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_P20246827_05-02-2025_08_18_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20246869, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20246870, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20246871, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20246872, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20246873, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20246874, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20246875, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20246876, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20246877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20246878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20246879, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20246880, 'pht': 3726}}"}, {'dashboat_entry_day': 1578490, 'dashboard_run_id': 1586771, 'mtr_portfolio_id': 20247107, 'dashboard_result_id': 8701725, '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_P20247107_05-02-2025_08_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20247122, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20247123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20247124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20247125, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20247126, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20247127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20247128, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20247129, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20247130, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20247131, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20247132, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20247133, 'pht': 3726}}"}, {'dashboat_entry_day': 1578490, 'dashboard_run_id': 1586771, 'mtr_portfolio_id': 20247621, 'dashboard_result_id': 8701726, '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_P20247621_05-02-2025_08_49_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20247628, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20247629, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20247630, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20247631, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20247632, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20247633, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20247634, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20247635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20247636, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20247637, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20247638, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20247639, 'pht': 3726}}"}, {'dashboat_entry_day': 1578490, 'dashboard_run_id': 1586771, 'mtr_portfolio_id': 20248017, 'dashboard_result_id': 8701727, '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_P20248017_05-02-2025_08_50_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20248018, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20248019, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20248020, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20248021, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20248022, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20248023, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20248024, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20248025, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20248026, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20248027, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20248028, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20248029, '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 = 20246827 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 20246827 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 20246827 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 20246827 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 20246827 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20246827 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20246827_05-02-2025_08_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20246827 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_P20246827_05-02-2025_08_18_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20246869, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20246870, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20246871, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20246872, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20246873, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20246874, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20246875, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20246876, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20246877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20246878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20246879, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20246880, 'pht': 3726}}" where mtr_portfolio_id = 20246827 and dashboard_run_id = 1586771 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 = 20247107 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': 2549241, 'mtr_portfolio_id': 20247107, 'created_at': datetime.datetime(2025, 2, 5, 8, 33), 'result': '0.03511178910191624', 'result_long': None, 'result_double': None}] Qualite : 0.03511178910191624 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20247107 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20247107_05-02-2025_08_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20247107 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_P20247107_05-02-2025_08_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20247122, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20247123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20247124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20247125, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20247126, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20247127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20247128, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20247129, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20247130, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20247131, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20247132, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20247133, 'pht': 3726}}" where mtr_portfolio_id = 20247107 and dashboard_run_id = 1586771 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`=20247107 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8701725, 0.03511178910191624, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20247107_05-02-2025_08_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20247122, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20247123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20247124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20247125, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20247126, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20247127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20247128, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20247129, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20247130, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20247131, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20247132, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20247133, '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 = 20247621 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': 2549350, 'mtr_portfolio_id': 20247621, 'created_at': datetime.datetime(2025, 2, 5, 8, 49, 1), 'result': '0.03201260177414222', 'result_long': None, 'result_double': None}] Qualite : 0.03201260177414222 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20247621 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20247621_05-02-2025_08_49_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20247621 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_P20247621_05-02-2025_08_49_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20247628, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20247629, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20247630, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20247631, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20247632, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20247633, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20247634, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20247635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20247636, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20247637, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20247638, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20247639, 'pht': 3726}}" where mtr_portfolio_id = 20247621 and dashboard_run_id = 1586771 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`=20247621 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8701726, 0.03201260177414222, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20247621_05-02-2025_08_49_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20247628, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20247629, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20247630, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20247631, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20247632, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20247633, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20247634, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20247635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20247636, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20247637, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20247638, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20247639, '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 = 20248017 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 20248017 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 20248017 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 20248017 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 20248017 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20248017 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20248017_05-02-2025_08_53_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20248017 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_P20248017_05-02-2025_08_53_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20248018, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20248019, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20248020, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20248021, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20248022, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20248023, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20248024, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20248025, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20248026, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20248027, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20248028, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20248029, 'pht': 3726}}" where mtr_portfolio_id = 20248017 and dashboard_run_id = 1586771 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20246827,20247107,20247621,20248017) result : ((1334841290,), (1334841770,), (1334842209,), (1334842491,), (1334842493,), (1334842496,), (1334842498,), (1334842504,), (1334842510,), (1334842541,), (1334842543,), (1334842546,), (1334842549,), (1334842552,), (1334842612,), (1334842628,), (1334842642,), (1334842651,), (1334842689,), (1334842691,), (1334842694,), (1334842697,), (1334842704,), (1334842708,), (1334842746,), (1334842776,), (1334842779,), (1334842787,), (1334842790,), (1334842864,), (1334842938,), (1334843015,), (1334843077,), (1334843080,), (1334843289,), (1334843291,), (1334843360,), (1334843366,), (1334843393,), (1334843395,), (1334843398,), (1334843401,), (1334843424,), (1334843427,), (1334843432,), (1334843436,), (1334843476,), (1334843467,), (1334843468,), (1334843470,), (1334843472,), (1334843473,), (1334843672,), (1334843676,), (1334843762,), (1334843765,), (1334843845,), (1334843847,), (1334843850,), (1334843854,), (1334843857,), (1334843881,), (1334843884,), (1334843889,), (1334843893,), (1334843897,), (1334843929,), (1334843930,), (1334843932,), (1334843934,), (1334843971,), (1334843974,), (1334843977,), (1334843980,), (1334843981,), (1334844204,), (1334844216,), (1334844219,), (1334844225,), (1334844226,), (1334844269,), (1334844278,), (1334844282,), (1334844286,), (1334844291,), (1334844298,), (1334844353,), (1334844354,), (1334844356,), (1334844358,), (1334844384,), (1334844461,), (1334844529,), (1334844532,), (1334844536,), (1334845049,), (1334845125,), (1334845188,), (1334845247,), (1334845251,), (1334845255,), (1334845465,), (1334845537,), (1334845599,), (1334845658,), (1334845944,), (1334845945,), (1334845947,), (1334845949,), (1334845951,), (1334845953,), (1334845987,), (1334845988,), (1334845990,), (1334845992,), (1334846082,), (1334846099,), (1334846149,), (1334846335,), (1334846465,), (1334846778,), (1334846757,), (1334846763,), (1334846766,), (1334846772,), (1334846800,), (1334846802,), (1334846908,), (1334846955,), (1334847309,), (1334847310,), (1334847312,), (1334847313,), (1334847317,), (1334847323,), (1334847664,), (1334847665,), (1334847666,), (1334847719,), (1334847887,), (1334847924,), (1334847962,), (1334847987,), (1334848001,), (1334848027,), (1334848030,), (1334848031,), (1334848032,), (1334848035,), (1334848036,), (1334848215,), (1334848224,), (1334848239,), (1334848254,), (1334848321,), (1334848349,), (1334848377,), (1334848485,), (1334848515,), (1334848518,), (1334848527,), (1334848533,), (1334848538,), (1334848712,), (1334848732,), (1334848735,), (1334848764,), (1334848771,), (1334848776,), (1334848990,), (1334849054,), (1334849092,), (1334849126,), (1334849656,), (1334849658,), (1334849659,), (1334849661,), (1334849680,), (1334849684,), (1334850035,), (1334850056,), (1334850134,), (1334850160,), (1334850250,), (1334850451,), (1334850426,), (1334850443,), (1334850445,), (1334850447,), (1334850449,), (1334850547,), (1334850551,), (1334850556,), (1334850558,), (1334850562,), (1334850569,), (1334850884,), (1334850887,), (1334850901,), (1334851469,), (1334851521,), (1334851532,), (1334851669,), (1334851709,), (1334851864,), (1334851908,), (1334851915,), (1334851917,), (1334851918,), (1334852061,), (1334852066,), (1334852073,), (1334852088,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'05022025': {'nb_upload': 28, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20248017]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864] map_info['map_portfolio_photo'] : {20248017: [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864, 1334851709, 1334851669, 1334851532, 1334851521, 1334851469, 1334850901, 1334850887, 1334850884, 1334850569, 1334850562, 1334850558, 1334850556, 1334850551, 1334850547, 1334850449, 1334850447, 1334850445, 1334850443, 1334850426]} final : True mtd_id 4302 list_pids : [1334852088, 1334852073, 1334852066, 1334852061, 1334851918, 1334851917, 1334851915, 1334851908, 1334851864] Looping around the photos to save general results len do output : 1 /20248017Didn'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, '2549490') ('4302', '20248017', '1334852088', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852073', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852066', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334852061', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851918', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851917', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851915', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851908', None, None, None, None, None, '2549490') ('4302', None, None, None, None, None, None, None, '2549490') ('4302', '20248017', '1334851864', None, None, None, None, None, '2549490') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '20248017', 'None', None, None, None, None, '2549490'), ('4302', '20248017', '1334852088', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334852073', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334852066', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334852061', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851918', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851917', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851915', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851908', None, None, None, None, None, '2549490'), ('4302', '20248017', '1334851864', None, None, None, None, None, '2549490')] time used for this insertion : 0.01323843002319336 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.27674102783203125 time spend to save output : 0.013444185256958008 total time spend for step 5 : 0.29018521308898926 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 (2549490) 2.09user 2.40system 0:07.85elapsed 57%CPU (0avgtext+0avgdata 160424maxresident)k 240inputs+5208outputs (3major+64176minor)pagefaults 0swaps