Ilyas KHIAT commited on
Commit
cfe91b8
1 Parent(s): 0efc7db
Files changed (2) hide show
  1. emissions.csv +6 -0
  2. empreinte_carbone.py +5 -0
emissions.csv CHANGED
@@ -2006,3 +2006,9 @@ N,1.0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2006
  2024-08-31T23:04:12,codecarbon,44fd28e2-39d9-4373-87e1-66396cd26dcc,0.0925383567810058,2.3110981797444855e-07,2.4974489067422628e-06,42.5,62.9487964220454,5.86829710006714,1.0924667119979858e-06,1.583056822018758e-06,4.7291508272261753e-08,2.7228150422890057e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2007
  2024-09-01T11:21:42,codecarbon,46f778f4-e8f1-453e-8ca7-68eb9f6b4ca3,0.1146209239959716,6.575957931741543e-07,5.73713568385878e-06,42.5,210.310999596944,5.86829710006714,1.3178030649820966e-06,6.286949474021419e-06,1.4269727984630741e-07,7.747449818849824e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2008
  2024-09-01T12:12:59,codecarbon,eaca78f0-eb6d-410f-8451-3a63c5113715,0.1146235466003418,2.902243849084973e-07,2.5319787558172786e-06,42.5,64.65446400235312,5.86829710006714,1.3413815034760369e-06,1.9327793240042634e-06,1.451111350604606e-07,3.4192719625407613e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
 
 
 
 
 
 
 
2006
  2024-08-31T23:04:12,codecarbon,44fd28e2-39d9-4373-87e1-66396cd26dcc,0.0925383567810058,2.3110981797444855e-07,2.4974489067422628e-06,42.5,62.9487964220454,5.86829710006714,1.0924667119979858e-06,1.583056822018758e-06,4.7291508272261753e-08,2.7228150422890057e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2007
  2024-09-01T11:21:42,codecarbon,46f778f4-e8f1-453e-8ca7-68eb9f6b4ca3,0.1146209239959716,6.575957931741543e-07,5.73713568385878e-06,42.5,210.310999596944,5.86829710006714,1.3178030649820966e-06,6.286949474021419e-06,1.4269727984630741e-07,7.747449818849824e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2008
  2024-09-01T12:12:59,codecarbon,eaca78f0-eb6d-410f-8451-3a63c5113715,0.1146235466003418,2.902243849084973e-07,2.5319787558172786e-06,42.5,64.65446400235312,5.86829710006714,1.3413815034760369e-06,1.9327793240042634e-06,1.451111350604606e-07,3.4192719625407613e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2009
+ 2024-09-03T09:31:09,codecarbon,1487bdf9-3bea-4a3b-ab09-5e86c4a5704a,0.1882181167602539,7.987920255449241e-07,4.243969917956407e-06,42.5,134.96533569499977,5.86829710006714,2.210223178068797e-06,6.944172222002332e-06,2.565546057598075e-07,9.410950005830936e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2010
+ 2024-09-03T09:57:22,codecarbon,4cf18714-ac4b-4337-aa05-6219d5892007,0.0330922603607177,4.257681736589454e-07,1.2866095244565227e-05,42.5,542.475614414426,5.86829710006714,3.906725181473626e-07,4.606670352000353e-06,1.8835143954068675e-08,5.016178014101784e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2011
+ 2024-09-03T15:53:25,codecarbon,4cf18714-ac4b-4337-aa05-6219d5892007,21362.90957331657,0.0253261286753127,1.185518694838575e-06,42.5,1.9127371028647235,5.86829710006714,0.25220099218669867,0.011355034361797994,0.0348231800316087,0.2983792065801053,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2012
+ 2024-09-03T16:54:16,codecarbon,4cf18714-ac4b-4337-aa05-6219d5892007,25014.247923612595,0.0295550240941919,1.181527591173071e-06,42.5,0.7538767857998552,5.86829710006714,0.2953070581595103,0.012119661084609996,0.040775122132333,0.3482018413764532,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2013
+ 2024-09-03T22:34:13,codecarbon,cfb26c96-cd2c-4730-be56-e9e2d85446f9,0.0390017032623291,1.8160302623281019e-07,4.656284496380356e-06,42.5,160.66647389009725,5.86829710006714,4.486320747269525e-07,1.6533346559946538e-06,3.758517531887644e-08,2.1395519060404827e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
2014
+ 2024-09-04T08:51:38,codecarbon,2b053ea7-7802-4341-8f5a-bb5ad7c14df2,0.05975627899169922,6.627027956068078e-07,1.1090094744668829e-05,42.5,499.40003505872187,5.86829710006714,6.979099578327603e-07,7.053616754008896e-06,5.6091139532744215e-08,7.8076178513744e-06,France,FRA,nouvelle-aquitaine,,,Windows-11-10.0.22631-SP0,3.12.3,2.5.0,16.0,12th Gen Intel(R) Core(TM) i5-12500H,1,1 x NVIDIA GeForce RTX 4050 Laptop GPU,-0.6455,44.8152,15.648792266845703,machine,N,1.0
empreinte_carbone.py CHANGED
@@ -40,9 +40,14 @@ def display_cf_comparison(stm: st):
40
  serveur_emission = st.session_state['emission'].stop()
41
  emission_api = sum([value["el"] for value in st.session_state["partial_emissions"].values()])
42
 
 
 
 
 
43
  total_emission = serveur_emission + emission_api
44
 
45
  pourcentage_api = emission_api / total_emission
 
46
  pourcentage_serveur = serveur_emission / total_emission
47
 
48
 
 
40
  serveur_emission = st.session_state['emission'].stop()
41
  emission_api = sum([value["el"] for value in st.session_state["partial_emissions"].values()])
42
 
43
+ if serveur_emission is None :
44
+ serveur_emission = 0
45
+ if emission_api is None :
46
+ emission_api = 0
47
  total_emission = serveur_emission + emission_api
48
 
49
  pourcentage_api = emission_api / total_emission
50
+
51
  pourcentage_serveur = serveur_emission / total_emission
52
 
53