python /home/admin/mtr/script_for_cron.py -j datou_current3 -m 12 -a ' -a 533 -l 200 --rand=1 ' -s datou_current_533 -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'] process id : 1792786 load datou : 533 # 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 ! 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 ! 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 ! DataTypes for each output/input checked ! Unexpected type for variable list_input_json ERROR or WARNING : can't parse json string Expecting value: line 1 column 1 (char 0) Tried to parse : chemin de la photo was removed should we ? [ (photo_id, hashtag_id_0, score_0), (photo_id, hashtag_id_1, score_1), ...] was removed should we ? [ (photo_id, hashtag_id_0, score_0), (photo_id, hashtag_id_1, score_1), ...] was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? chemin de la photo was removed should we ? load thcls load pdts Running datou job : batch_current TODO datou_current to load to do maybe to take outside batchDatouExec no input labels no input values updating current state to 1 we have a portfolio with more photos than limit : 262>200 please execute split_portfolio.py -i 20675551 -l 200 size over we load limit photo not treated list_input_json: {} Current got : datou_id : 533, datou_cur_ids : ['2599566'] with mtr_portfolio_ids : ['20675551'] and first list_photo_ids : [] new path : /proc/1792786/ Inside batchDatouExec : verbose : 0 # 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 ! 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 ! 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 ! DataTypes for each output/input checked ! List Step Type Loaded in datou : tfhub_classification2, argmax list_input_json : {} origin We have 1 , WARNING: data may be incomplete, need to offset and complete ! BFwe have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB length of list_filenames : 1 ; length of list_pids : 1 ; length of list_args : 1 time to download the photos : 0.10969686508178711 About to test input to load we should then remove the video here, and this would fix the bug of datou_current ! Calling datou_exec Inside datou_exec : verbose : 0 number of steps : 2 step1:tfhub_classification2 Thu Feb 20 12:50:27 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 Beginning of datou_step TFHub with tf2 ! nombre de thcls : 3 we are using the classfication for multi_thcl [3513, 3379, 3847] begin to check gpu status inside check gpu memory 2025-02-20 12:50:30.389767: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1 2025-02-20 12:50:30.419396: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties: pciBusID: 0000:41:00.0 name: NVIDIA GeForce RTX 2080 Ti computeCapability: 7.5 coreClock: 1.545GHz coreCount: 68 deviceMemorySize: 10.76GiB deviceMemoryBandwidth: 573.69GiB/s 2025-02-20 12:50:30.419704: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1 2025-02-20 12:50:30.422218: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10 2025-02-20 12:50:30.424369: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10 2025-02-20 12:50:30.424656: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10 2025-02-20 12:50:30.426735: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10 2025-02-20 12:50:30.427768: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10 2025-02-20 12:50:30.432028: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 2025-02-20 12:50:30.433244: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1703] Adding visible gpu devices: 0 2025-02-20 12:50:30.433671: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2025-02-20 12:50:30.459332: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 3493065000 Hz 2025-02-20 12:50:30.461249: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f14ec000b60 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2025-02-20 12:50:30.461277: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2025-02-20 12:50:30.689311: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2811a930 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices: 2025-02-20 12:50:30.689381: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): NVIDIA GeForce RTX 2080 Ti, Compute Capability 7.5 2025-02-20 12:50:30.690535: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties: pciBusID: 0000:41:00.0 name: NVIDIA GeForce RTX 2080 Ti computeCapability: 7.5 coreClock: 1.545GHz coreCount: 68 deviceMemorySize: 10.76GiB deviceMemoryBandwidth: 573.69GiB/s 2025-02-20 12:50:30.690638: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1 2025-02-20 12:50:30.690688: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10 2025-02-20 12:50:30.690731: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10 2025-02-20 12:50:30.690773: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10 2025-02-20 12:50:30.690814: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10 2025-02-20 12:50:30.690853: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10 2025-02-20 12:50:30.690893: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 2025-02-20 12:50:30.692529: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1703] Adding visible gpu devices: 0 2025-02-20 12:50:30.692595: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1 2025-02-20 12:50:30.693552: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix: 2025-02-20 12:50:30.693577: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108] 0 2025-02-20 12:50:30.693591: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0: N 2025-02-20 12:50:30.695337: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1247] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3096 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce RTX 2080 Ti, pci bus id: 0000:41:00.0, compute capability: 7.5) l 3637 free memory gpu now : 4300 max_wait_temp : 1 max_wait : 5 1 Physical GPUs, 1 Logical GPUs tagging for thcl : 3513 To do loadFromThcl(), then load ParamDescType : thcl3513 Catched exception ! Connect or reconnect ! ERROR in datou_step_exec, will save and exit ! Unable to connect to sql.fotonower.com : (2003, "Can't connect to MySQL server on 'sql.fotonower.com:3306' (111)") File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 2329, in datou_exec output = datou_step_exec(sNext, args, cache, context, map_info, verbose, mtr_user_id) File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 2523, in datou_step_exec return lib_process.datou_step_tfhub2(param, json_param, args, cache, context, map_info, verbose) File "/home/admin/workarea/git/Velours/python/mtr/datou/lib_step_exec/lib_step_process.py", line 3113, in datou_step_tfhub2 photo_desc_type, list_hashtags = context.load_thcl_param(thclid, verbose) File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 1806, in load_thcl_param return self.cache_model_config.load_thcl_param(self.cat, thclid, verbose) File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 2091, in load_thcl_param pb_hashtag_id_or_classifier) = self.get_desc_type_from_thcl(thclid, cat, verbose) File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 2131, in get_desc_type_from_thcl thcls = cat.getClassificationThemes(0, False, thclid, verbose) File "/home/admin/workarea/git/Velours/python/mtr/database_queries/classification_admin_tools.py", line 67, in getClassificationThemes thcls = self.gq.select(query) File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 77, in select self.connect() File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 46, in connect raise Exception("Unable to connect to " + str(self.host) + " : " + str(e)) [1338588793] begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 Catched exception ! Connect or reconnect ! exception in save_final Unable to connect to sql.fotonower.com : (2003, "Can't connect to MySQL server on 'sql.fotonower.com:3306' (111)") query : 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_tup_unique : [('533', '20675551', '1338588793', '[>, , , , \'Unable to connect to sql.fotonower.com : (2003, "Can\\\'t connect to MySQL server on \\\'sql.fotonower.com:3306\\\' (111)")\']', '-1', '-1.0', '501120777', '1.0', '2599566')] time used for this insertion : 0.011261701583862305 save_final ERROR in last step tfhub_classification2, Unable to connect to sql.fotonower.com : (2003, "Can't connect to MySQL server on 'sql.fotonower.com:3306' (111)") time spend for datou_step_exec : 3.195096492767334 time spend to save output : 0.014158487319946289 total time spend for step 0 : 3.2092549800872803 Catched exception ! Connect or reconnect ! Traceback (most recent call last): File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 68, in select cursor.execute(query, args) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/cursors.py", line 209, in execute res = self._query(query) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/cursors.py", line 315, in _query db.query(q) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/connections.py", line 239, in query _mysql.connection.query(self, query) MySQLdb._exceptions.OperationalError: (1053, 'Server shutdown in progress') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 43, in connect self.db = MySQLdb.connect(host=self.host, db=self.dbname, user=self.user, passwd=self.password) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/__init__.py", line 84, in Connect return Connection(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/connections.py", line 179, in __init__ super(Connection, self).__init__(*args, **kwargs2) MySQLdb._exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'sql.fotonower.com:3306' (111)") During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 2329, in datou_exec output = datou_step_exec(sNext, args, cache, context, map_info, verbose, mtr_user_id) File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 2523, in datou_step_exec return lib_process.datou_step_tfhub2(param, json_param, args, cache, context, map_info, verbose) File "/home/admin/workarea/git/Velours/python/mtr/datou/lib_step_exec/lib_step_process.py", line 3113, in datou_step_tfhub2 photo_desc_type, list_hashtags = context.load_thcl_param(thclid, verbose) File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 1806, in load_thcl_param return self.cache_model_config.load_thcl_param(self.cat, thclid, verbose) File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 2091, in load_thcl_param pb_hashtag_id_or_classifier) = self.get_desc_type_from_thcl(thclid, cat, verbose) File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 2131, in get_desc_type_from_thcl thcls = cat.getClassificationThemes(0, False, thclid, verbose) File "/home/admin/workarea/git/Velours/python/mtr/database_queries/classification_admin_tools.py", line 67, in getClassificationThemes thcls = self.gq.select(query) File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 77, in select self.connect() File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 46, in connect raise Exception("Unable to connect to " + str(self.host) + " : " + str(e)) Exception: Unable to connect to sql.fotonower.com : (2003, "Can't connect to MySQL server on 'sql.fotonower.com:3306' (111)") During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 100, in insert number = cursor.execute(query, args) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/cursors.py", line 209, in execute res = self._query(query) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/cursors.py", line 315, in _query db.query(q) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/connections.py", line 239, in query _mysql.connection.query(self, query) MySQLdb._exceptions.OperationalError: (2013, 'Lost connection to MySQL server during query') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 43, in connect self.db = MySQLdb.connect(host=self.host, db=self.dbname, user=self.user, passwd=self.password) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/__init__.py", line 84, in Connect return Connection(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/MySQLdb/connections.py", line 179, in __init__ super(Connection, self).__init__(*args, **kwargs2) MySQLdb._exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'sql.fotonower.com:3306' (111)") During handling of the above exception, another exception occurred: Traceback (most recent call last): File "prod/datou.py", line 270, in ret = batchDatouCurrent(context, datou_id, mtr_portfolio_ids, list_photo_ids, limit, offset, rand, save, File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 621, in batchDatouCurrent ret = batchDatouExec(context, datou_id, mtr_portfolio_ids, list_photo_ids, list_input_json, limit, File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 819, in batchDatouExec output, datou_failed_to_relaunch = datou_exec(datou, input, cache, context, map_info, save, list_pids, verbose, mtr_user_id, is_last_batch, end_time) File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 2368, in datou_exec context.update_current_state(map_info["datou_cur_ids"], 0, verbose) File "/home/admin/workarea/git/Velours/python/mtr/datou/datou_lib.py", line 1875, in update_current_state self.DQ.update_current_state(map_info_datou_cur_ids, status, verbose) File "/home/admin/workarea/git/Velours/python/mtr/database_queries/datou_queries.py", line 170, in update_current_state self.gq.insert(query) File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 110, in insert self.connect() File "/home/admin/workarea/git/Velours/python/mtr/database_queries/general_queries.py", line 46, in connect raise Exception("Unable to connect to " + str(self.host) + " : " + str(e)) Exception: Unable to connect to sql.fotonower.com : (2003, "Can't connect to MySQL server on 'sql.fotonower.com:3306' (111)") Command exited with non-zero status 1 3.37user 2.58system 0:06.43elapsed 92%CPU (0avgtext+0avgdata 541848maxresident)k 41320inputs+520outputs (222major+160470minor)pagefaults 0swaps