Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
createAndParseSACCT
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
John-Paul Robinson
createAndParseSACCT
Commits
cf3a83da
Commit
cf3a83da
authored
5 years ago
by
William Monroe
Browse files
Options
Downloads
Patches
Plain Diff
removing output cells
parent
df73e1ad
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
importSACCTinfo.ipynb
+7
-176
7 additions, 176 deletions
importSACCTinfo.ipynb
slurm-2sql.ipynb
+8
-234
8 additions, 234 deletions
slurm-2sql.ipynb
with
15 additions
and
410 deletions
importSACCTinfo.ipynb
+
7
−
176
View file @
cf3a83da
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"cells": [
"cells": [
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
1
,
"execution_count":
null
,
"metadata": {
"metadata": {
"ExecuteTime": {
"ExecuteTime": {
"end_time": "2020-03-16T20:57:10.405006Z",
"end_time": "2020-03-16T20:57:10.405006Z",
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
2
,
"execution_count":
null
,
"metadata": {
"metadata": {
"ExecuteTime": {
"ExecuteTime": {
"end_time": "2020-03-16T20:57:11.865980Z",
"end_time": "2020-03-16T20:57:11.865980Z",
...
@@ -32,175 +32,28 @@
...
@@ -32,175 +32,28 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
3
,
"execution_count":
null
,
"metadata": {
"metadata": {
"ExecuteTime": {
"ExecuteTime": {
"end_time": "2020-03-16T20:57:11.932878Z",
"end_time": "2020-03-16T20:57:11.932878Z",
"start_time": "2020-03-16T20:57:11.905219Z"
"start_time": "2020-03-16T20:57:11.905219Z"
}
}
},
},
"outputs": [
"outputs": [],
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>User</th>\n",
" <th>Start</th>\n",
" <th>JobID</th>\n",
" <th>JobName</th>\n",
" <th>State</th>\n",
" <th>Partition</th>\n",
" <th>MaxRSS</th>\n",
" <th>ReqMem</th>\n",
" <th>ReqCPUS</th>\n",
" <th>NodeList</th>\n",
" <th>NNodes</th>\n",
" <th>Elapsed</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>user</td>\n",
" <td>2019-01-06T22:00:21</td>\n",
" <td>2040834</td>\n",
" <td>_interactive</td>\n",
" <td>COMPLETED</td>\n",
" <td>medium</td>\n",
" <td>NaN</td>\n",
" <td>10000Mc</td>\n",
" <td>1</td>\n",
" <td>c0089</td>\n",
" <td>1</td>\n",
" <td>16:04:23</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>NaN</td>\n",
" <td>2019-01-06T22:00:21</td>\n",
" <td>2040834.batch</td>\n",
" <td>batch</td>\n",
" <td>COMPLETED</td>\n",
" <td>NaN</td>\n",
" <td>1394528K</td>\n",
" <td>10000Mc</td>\n",
" <td>1</td>\n",
" <td>c0088</td>\n",
" <td>1</td>\n",
" <td>16:04:23</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>user</td>\n",
" <td>2019-01-07T16:15:21</td>\n",
" <td>2043373</td>\n",
" <td>Pipe_trim_galore</td>\n",
" <td>COMPLETED</td>\n",
" <td>medium</td>\n",
" <td>NaN</td>\n",
" <td>2000Mc</td>\n",
" <td>1</td>\n",
" <td>c0038</td>\n",
" <td>1</td>\n",
" <td>00:18:41</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>NaN</td>\n",
" <td>2019-01-07T16:15:21</td>\n",
" <td>2043373.batch</td>\n",
" <td>batch</td>\n",
" <td>COMPLETED</td>\n",
" <td>NaN</td>\n",
" <td>58592K</td>\n",
" <td>2000Mc</td>\n",
" <td>1</td>\n",
" <td>c0038</td>\n",
" <td>1</td>\n",
" <td>00:18:41</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>user</td>\n",
" <td>2019-01-07T16:15:21</td>\n",
" <td>2043374</td>\n",
" <td>Pipe_trim_galore</td>\n",
" <td>COMPLETED</td>\n",
" <td>medium</td>\n",
" <td>NaN</td>\n",
" <td>2000Mc</td>\n",
" <td>1</td>\n",
" <td>c0063</td>\n",
" <td>1</td>\n",
" <td>00:15:48</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" User Start JobID JobName State \\\n",
"0 user 2019-01-06T22:00:21 2040834 _interactive COMPLETED \n",
"1 NaN 2019-01-06T22:00:21 2040834.batch batch COMPLETED \n",
"2 user 2019-01-07T16:15:21 2043373 Pipe_trim_galore COMPLETED \n",
"3 NaN 2019-01-07T16:15:21 2043373.batch batch COMPLETED \n",
"4 user 2019-01-07T16:15:21 2043374 Pipe_trim_galore COMPLETED \n",
"\n",
" Partition MaxRSS ReqMem ReqCPUS NodeList NNodes Elapsed \n",
"0 medium NaN 10000Mc 1 c0088 1 16:04:23 \n",
"1 NaN 1394528K 10000Mc 1 c0088 1 16:04:23 \n",
"2 medium NaN 2000Mc 1 c0038 1 00:18:41 \n",
"3 NaN 58592K 2000Mc 1 c0038 1 00:18:41 \n",
"4 medium NaN 2000Mc 1 c0063 1 00:15:48 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"source": [
"df.head()"
"df.head()"
]
]
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
4
,
"execution_count":
null
,
"metadata": {
"metadata": {
"ExecuteTime": {
"ExecuteTime": {
"end_time": "2020-03-16T20:57:14.154962Z",
"end_time": "2020-03-16T20:57:14.154962Z",
"start_time": "2020-03-16T20:57:11.967976Z"
"start_time": "2020-03-16T20:57:11.967976Z"
}
}
},
},
"outputs": [
"outputs": [],
{
"data": {
"text/plain": [
"array(['medium', nan, 'medium', ..., 'medium', nan, nan], dtype=object)"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"source": [
"df[['jid','step']] = df.JobID.str.split(\".\",expand=True) \n",
"df[['jid','step']] = df.JobID.str.split(\".\",expand=True) \n",
"df.Partition.values"
"df.Partition.values"
...
@@ -214,29 +67,7 @@
...
@@ -214,29 +67,7 @@
"start_time": "2020-03-16T20:56:57.392Z"
"start_time": "2020-03-16T20:56:57.392Z"
}
}
},
},
"outputs": [
"outputs": [],
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/wsmonroe/.conda/envs/wsmplayground/lib/python3.6/site-packages/ipykernel_launcher.py:4: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
" after removing the cwd from sys.path.\n",
"/home/wsmonroe/.conda/envs/wsmplayground/lib/python3.6/site-packages/pandas/core/generic.py:7626: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
" self._update_inplace(new_data)\n",
"/home/wsmonroe/.conda/envs/wsmplayground/lib/python3.6/site-packages/IPython/core/interactiveshell.py:2961: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame\n",
"\n",
"See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
" exec(code_obj, self.user_global_ns, self.user_ns)\n"
]
}
],
"source": [
"source": [
"batchDF=df.dropna(subset=[\"MaxRSS\"])\n",
"batchDF=df.dropna(subset=[\"MaxRSS\"])\n",
"userDF=df.dropna(subset=[\"User\"])\n",
"userDF=df.dropna(subset=[\"User\"])\n",
...
...
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
import
numpy
as
np
import
numpy
as
np
import
pandas
as
pd
import
pandas
as
pd
import
pandas_profiling
import
pandas_profiling
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
df
=
pd
.
read_csv
(
'
userusage.txt
'
,
delimiter
=
'
|
'
)
df
=
pd
.
read_csv
(
'
userusage.txt
'
,
delimiter
=
'
|
'
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
df
.
head
()
df
.
head
()
```
```
%% Output
User Start JobID JobName State \
0 user 2019-01-06T22:00:21 2040834 _interactive COMPLETED
1 NaN 2019-01-06T22:00:21 2040834.batch batch COMPLETED
2 user 2019-01-07T16:15:21 2043373 Pipe_trim_galore COMPLETED
3 NaN 2019-01-07T16:15:21 2043373.batch batch COMPLETED
4 user 2019-01-07T16:15:21 2043374 Pipe_trim_galore COMPLETED
Partition MaxRSS ReqMem ReqCPUS NodeList NNodes Elapsed
0 medium NaN 10000Mc 1 c0088 1 16:04:23
1 NaN 1394528K 10000Mc 1 c0088 1 16:04:23
2 medium NaN 2000Mc 1 c0038 1 00:18:41
3 NaN 58592K 2000Mc 1 c0038 1 00:18:41
4 medium NaN 2000Mc 1 c0063 1 00:15:48
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
df
[[
'
jid
'
,
'
step
'
]]
=
df
.
JobID
.
str
.
split
(
"
.
"
,
expand
=
True
)
df
[[
'
jid
'
,
'
step
'
]]
=
df
.
JobID
.
str
.
split
(
"
.
"
,
expand
=
True
)
df
.
Partition
.
values
df
.
Partition
.
values
```
```
%% Output
array(['medium', nan, 'medium', ..., 'medium', nan, nan], dtype=object)
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
batchDF
=
df
.
dropna
(
subset
=
[
"
MaxRSS
"
])
batchDF
=
df
.
dropna
(
subset
=
[
"
MaxRSS
"
])
userDF
=
df
.
dropna
(
subset
=
[
"
User
"
])
userDF
=
df
.
dropna
(
subset
=
[
"
User
"
])
for
jid
in
df
.
jid
.
unique
():
for
jid
in
df
.
jid
.
unique
():
userDF
[
'
MaxRSS
'
][
userDF
[
'
jid
'
]
==
jid
]
=
batchDF
[
'
MaxRSS
'
][
batchDF
[
'
jid
'
]
==
jid
]
userDF
[
'
MaxRSS
'
][
userDF
[
'
jid
'
]
==
jid
]
=
batchDF
[
'
MaxRSS
'
][
batchDF
[
'
jid
'
]
==
jid
]
#print(userDF[userDF['jid'] == jid])
#print(userDF[userDF['jid'] == jid])
userDF
.
head
()
userDF
.
head
()
```
```
%% Output
/home/wsmonroe/.conda/envs/wsmplayground/lib/python3.6/site-packages/ipykernel_launcher.py:4: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
after removing the cwd from sys.path.
/home/wsmonroe/.conda/envs/wsmplayground/lib/python3.6/site-packages/pandas/core/generic.py:7626: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
self._update_inplace(new_data)
/home/wsmonroe/.conda/envs/wsmplayground/lib/python3.6/site-packages/IPython/core/interactiveshell.py:2961: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
exec(code_obj, self.user_global_ns, self.user_ns)
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
# add more graphs here
# add more graphs here
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
```
```
...
...
This diff is collapsed.
Click to expand it.
slurm-2sql.ipynb
+
8
−
234
View file @
cf3a83da
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"cells": [
"cells": [
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
8
,
"execution_count":
null
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -13,20 +13,9 @@
...
@@ -13,20 +13,9 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
6
,
"execution_count":
null
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [],
{
"data": {
"text/plain": [
"0"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"source": [
"db = sqlite3.connect('test.db')\n",
"db = sqlite3.connect('test.db')\n",
"slurm2sql.slurm2sql(db, ['-S', '2020-03-18', '-a'])"
"slurm2sql.slurm2sql(db, ['-S', '2020-03-18', '-a'])"
...
@@ -34,7 +23,7 @@
...
@@ -34,7 +23,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
9
,
"execution_count":
null
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -44,233 +33,18 @@
...
@@ -44,233 +33,18 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
11
,
"execution_count":
null
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [],
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>JobID</th>\n",
" <th>ArrayJobID</th>\n",
" <th>ArrayTaskID</th>\n",
" <th>JobStep</th>\n",
" <th>JobIDSlurm</th>\n",
" <th>JobName</th>\n",
" <th>User</th>\n",
" <th>Group</th>\n",
" <th>Account</th>\n",
" <th>State</th>\n",
" <th>...</th>\n",
" <th>MaxDiskReadNode</th>\n",
" <th>MaxDiskReadTask</th>\n",
" <th>MaxDiskWrite</th>\n",
" <th>MaxDiskWriteNode</th>\n",
" <th>MaxDiskWriteTask</th>\n",
" <th>ReqGPUS</th>\n",
" <th>Comment</th>\n",
" <th>GPUMem</th>\n",
" <th>GPUEff</th>\n",
" <th>NGPU</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>3319116</td>\n",
" <td>3319116</td>\n",
" <td>NaN</td>\n",
" <td>None</td>\n",
" <td>3319116_[43-45,47%5]</td>\n",
" <td>1mUD1MPa</td>\n",
" <td>user</td>\n",
" <td>user</td>\n",
" <td>user</td>\n",
" <td>PENDING</td>\n",
" <td>...</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>NaN</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>NaN</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>3927198</td>\n",
" <td>3887451</td>\n",
" <td>30.0</td>\n",
" <td>None</td>\n",
" <td>3887451_30</td>\n",
" <td>100kCrC20MPa</td>\n",
" <td>user</td>\n",
" <td>user</td>\n",
" <td>user</td>\n",
" <td>COMPLETED</td>\n",
" <td>...</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>NaN</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>NaN</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3927198</td>\n",
" <td>3887451</td>\n",
" <td>30.0</td>\n",
" <td>batch</td>\n",
" <td>3887451_30.batch</td>\n",
" <td>batch</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>user</td>\n",
" <td>COMPLETED</td>\n",
" <td>...</td>\n",
" <td>c0088</td>\n",
" <td>0</td>\n",
" <td>1.222336e+10</td>\n",
" <td>c0088</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3927198</td>\n",
" <td>3887451</td>\n",
" <td>30.0</td>\n",
" <td>extern</td>\n",
" <td>3887451_30.extern</td>\n",
" <td>extern</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>user</td>\n",
" <td>COMPLETED</td>\n",
" <td>...</td>\n",
" <td>c0088</td>\n",
" <td>0</td>\n",
" <td>0.000000e+00</td>\n",
" <td>c0088</td>\n",
" <td>0</td>\n",
" <td>NaN</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>3927199</td>\n",
" <td>3887451</td>\n",
" <td>31.0</td>\n",
" <td>None</td>\n",
" <td>3887451_31</td>\n",
" <td>100kCrC20MPa</td>\n",
" <td>user</td>\n",
" <td>user</td>\n",
" <td>user</td>\n",
" <td>COMPLETED</td>\n",
" <td>...</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>NaN</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>NaN</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>5 rows × 63 columns</p>\n",
"</div>"
],
"text/plain": [
" JobID ArrayJobID ArrayTaskID JobStep JobIDSlurm \\\n",
"0 3319116 3319116 NaN None 3319116_[43-45,47%5] \n",
"1 3927198 3887451 30.0 None 3887451_30 \n",
"2 3927198 3887451 30.0 batch 3887451_30.batch \n",
"3 3927198 3887451 30.0 extern 3887451_30.extern \n",
"4 3927199 3887451 31.0 None 3887451_31 \n",
"\n",
" JobName User Group Account State ... \\\n",
"0 1mUD1MPa user user user PENDING ... \n",
"1 100kCrC20MPa user user user COMPLETED ... \n",
"2 batch user COMPLETED ... \n",
"3 extern user COMPLETED ... \n",
"4 100kCrC20MPa user user user COMPLETED ... \n",
"\n",
" MaxDiskReadNode MaxDiskReadTask MaxDiskWrite MaxDiskWriteNode \\\n",
"0 NaN \n",
"1 NaN \n",
"2 c0088 0 1.222336e+10 c0088 \n",
"3 c0088 0 0.000000e+00 c0088 \n",
"4 NaN \n",
"\n",
" MaxDiskWriteTask ReqGPUS Comment GPUMem GPUEff NGPU \n",
"0 NaN None None None None \n",
"1 NaN None None None None \n",
"2 0 NaN None None None None \n",
"3 0 NaN None None None None \n",
"4 NaN None None None None \n",
"\n",
"[5 rows x 63 columns]"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"source": [
"df1.head(5)"
"df1.head(5)"
]
]
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
1
,
"execution_count":
null
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"more plots to come\n"
]
}
],
"source": [
"source": [
"print(\"more plots to come\")"
"print(\"more plots to come\")"
]
]
...
...
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
import
sqlite3
import
sqlite3
import
slurm2sql
import
slurm2sql
import
pandas
as
pd
import
pandas
as
pd
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
db
=
sqlite3
.
connect
(
'
test.db
'
)
db
=
sqlite3
.
connect
(
'
test.db
'
)
slurm2sql
.
slurm2sql
(
db
,
[
'
-S
'
,
'
2020-03-18
'
,
'
-a
'
])
slurm2sql
.
slurm2sql
(
db
,
[
'
-S
'
,
'
2020-03-18
'
,
'
-a
'
])
```
```
%% Output
0
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# For example, you can then convert to a dataframe:
# For example, you can then convert to a dataframe:
df1
=
pd
.
read_sql
(
'
SELECT * FROM slurm
'
,
db
)
df1
=
pd
.
read_sql
(
'
SELECT * FROM slurm
'
,
db
)
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
df1
.
head
(
5
)
df1
.
head
(
5
)
```
```
%% Output
JobID ArrayJobID ArrayTaskID JobStep JobIDSlurm \
0 3319116 3319116 NaN None 3319116_[43-45,47%5]
1 3927198 3887451 30.0 None 3887451_30
2 3927198 3887451 30.0 batch 3887451_30.batch
3 3927198 3887451 30.0 extern 3887451_30.extern
4 3927199 3887451 31.0 None 3887451_31
JobName User Group Account State ... \
0 1mUD1MPa user user user PENDING ...
1 100kCrC20MPa user user user COMPLETED ...
2 batch user COMPLETED ...
3 extern user COMPLETED ...
4 100kCrC20MPa user user user COMPLETED ...
MaxDiskReadNode MaxDiskReadTask MaxDiskWrite MaxDiskWriteNode \
0 NaN
1 NaN
2 c0088 0 1.222336e+10 c0088
3 c0088 0 0.000000e+00 c0088
4 NaN
MaxDiskWriteTask ReqGPUS Comment GPUMem GPUEff NGPU
0 NaN None None None None
1 NaN None None None None
2 0 NaN None None None None
3 0 NaN None None None None
4 NaN None None None None
[5 rows x 63 columns]
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
print
(
"
more plots to come
"
)
print
(
"
more plots to come
"
)
```
```
%% Output
more plots to come
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
```
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment