Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SacctDataAnalysis
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Saisri Vegesna
SacctDataAnalysis
Commits
87d4e82c
Commit
87d4e82c
authored
5 years ago
by
Saisri Vegesna
Browse files
Options
Downloads
Patches
Plain Diff
Delete slurm-2sql.ipynb
parent
5328465c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
slurm-2sql.ipynb
+0
-290
0 additions, 290 deletions
slurm-2sql.ipynb
with
0 additions
and
290 deletions
slurm-2sql.ipynb
deleted
100644 → 0
+
0
−
290
View file @
5328465c
{
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"import sqlite3\n",
"import slurm2sql\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"db = sqlite3.connect('test.db')\n",
"slurm2sql.slurm2sql(db, ['-S', '2020-03-18', '-a'])"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"# For example, you can then convert to a dataframe:\n",
"df1 = pd.read_sql('SELECT * FROM slurm', db)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"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>gpekmezi</td>\n",
" <td>gpekmezi</td>\n",
" <td>gpekmezi</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>gpekmezi</td>\n",
" <td>gpekmezi</td>\n",
" <td>gpekmezi</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>gpekmezi</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>gpekmezi</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>gpekmezi</td>\n",
" <td>gpekmezi</td>\n",
" <td>gpekmezi</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 gpekmezi gpekmezi gpekmezi PENDING ... \n",
"1 100kCrC20MPa gpekmezi gpekmezi gpekmezi COMPLETED ... \n",
"2 batch gpekmezi COMPLETED ... \n",
"3 extern gpekmezi COMPLETED ... \n",
"4 100kCrC20MPa gpekmezi gpekmezi gpekmezi 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": [
"df1.head(5)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:.conda-slurm-ds]",
"language": "python",
"name": "conda-env-.conda-slurm-ds-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
%% 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
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
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 gpekmezi gpekmezi gpekmezi PENDING ...
1 100kCrC20MPa gpekmezi gpekmezi gpekmezi COMPLETED ...
2 batch gpekmezi COMPLETED ...
3 extern gpekmezi COMPLETED ...
4 100kCrC20MPa gpekmezi gpekmezi gpekmezi 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
```
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