Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
John-Paul Robinson
createAndParseSACCT
Commits
c1f05b91
Commit
c1f05b91
authored
Mar 19, 2020
by
Saisri Vegesna
Browse files
Upload New File
parent
c1be2976
Changes
1
Hide whitespace changes
Inline
Side-by-side
slurm-2sql.ipynb
0 → 100644
View file @
c1f05b91
%% Cell type:code id: tags:
```
python
import
sqlite3
import
slurm2sql
import
pandas
as
pd
```
%% Cell type:code id: tags:
```
python
db
=
sqlite3
.
connect
(
'test.db'
)
slurm2sql
.
slurm2sql
(
db
,
[
'-S'
,
'2020-03-18'
,
'-a'
])
```
%%%% Output: execute_result
0
%% Cell type:code id: tags:
```
python
# For example, you can then convert to a dataframe:
df1
=
pd
.
read_sql
(
'SELECT * FROM slurm'
,
db
)
```
%% Cell type:code id: tags:
```
python
df1
.
head
(
5
)
```
%%%% Output: execute_result
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:
```
python
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment