Gitlab has been upgraded from version 14.2 to 14.4. Release notes can be found here (we run the Core release): https://about.gitlab.com/releases/2021/10/22/gitlab-14-4-released/

Commit 087f7f95 authored by KOMAL BADI's avatar KOMAL BADI
Browse files

updated charts

parent 7f001f13
......@@ -36,7 +36,7 @@
"outputs": [],
"source": [
"# For example, you can then convert to a dataframe:\n",
"df1 = pd.read_sql('SELECT * FROM slurm', db)"
"df = pd.read_sql('SELECT * FROM slurm', db)"
]
},
{
......@@ -45,7 +45,44 @@
"metadata": {},
"outputs": [],
"source": [
"df1.head(5)"
"df.head(5)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df.columns"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df['Waiting'] = df['Start']-df['Submit']\n",
"df.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df1 = df.dropna(subset=['Waiting'])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df1['Waiting'] = df1['Waiting']/60"
]
},
{
......@@ -57,6 +94,145 @@
"df1['ReqMemCPU']=df1['ReqMemCPU']/(1024*1024*1024)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df1['TotalRAM']=df1['NCPUS']*df1['ReqMemCPU']"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df1.head(10)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df1['TotalRAM'].describe()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"category = pd.cut(df1['Waiting'],bins=[-1,1,5,15,60,120,200,500,1000,2000,12000000],\n",
" labels=['<1min','<5min','<15min','<60min','<120min','<200min','<500min','<1000min','<2000min','>2000min'])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df1.insert(64,'wait_period_cat',category)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def get_row_as_bin(bin):\n",
" w = df1.loc[df1['wait_period_cat'] == bin]\n",
" return w"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df_slected_bin = get_row_as_bin(\">2000min\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"t = df_slected_bin[['NCPUS','wait_period_cat','TotalRAM','ReqMemCPU','User']]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"t.head(10)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"gp = t['TotalRAM'].value_counts(normalize=False,sort=False).plot(kind='bar')\n",
"gp.set_xlabel('Total RAM for the selected bin')\n",
"gp.set_ylabel('Frequency')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"t['TotalRAM'].describe()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"fig= plt.figure(figsize=(10,10))\n",
"\n",
"plt.scatter(df1['TotalRAM'],df1['NCPUS'])\n",
"\n",
"plt.xlabel('Total RAM')\n",
"plt.ylabel('N CPUS')\n",
"\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fig= plt.figure(figsize=(10,10))\n",
"\n",
"plt.scatter(df1['TotalRAM'],df1['ReqMemCPU'])\n",
"\n",
"plt.xlabel('Total RAM')\n",
"plt.ylabel('ReqMemCPU')\n",
"\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment