Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Fidle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Talks
Fidle
Commits
d5434aea
Commit
d5434aea
authored
5 years ago
by
Jean-Luc Parouty Jean-Luc.Parouty@simap.grenoble-inp.fr
Browse files
Options
Downloads
Patches
Plain Diff
Tensorboard cooking...
parent
769d6b58
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
GTSRB/99 Run-Tensorboard.ipynb
+112
-9
112 additions, 9 deletions
GTSRB/99 Run-Tensorboard.ipynb
with
112 additions
and
9 deletions
GTSRB/99 Run-Tensorboard.ipynb
+
112
−
9
View file @
d5434aea
...
...
@@ -21,11 +21,54 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 220,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Tensorbord started with pid 84593\n"
]
}
],
"source": [
"%%bash\n",
"tensorboard_start --logdir ./run/logs"
]
},
{
"cell_type": "code",
"execution_count": 225,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Tensorboard process not found...\n"
]
}
],
"source": [
"%%bash\n",
"tensorboard_stop"
]
},
{
"cell_type": "code",
"execution_count": 79,
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
"\n",
"# ---- Port number, \n",
"PORT_JPY=\"$(id -u)\"\n",
"PORT_TSB=\"$(( $PORT_J + 10000 ))\"\n",
"HOST_G=\"$(hostname)\"\n",
"SSH_CMD=\"/usr/bin/ssh -NL 8888:$HOST_G:$PORT_J -L 6006:$HOST_G:$PORT_T dahu.ciment\"\n",
"\n",
"tensorboard --port 21277 --host 0.0.0.0 --logdir ./run/logs &>/dev/null &"
]
},
...
...
@@ -38,13 +81,41 @@
},
{
"cell_type": "code",
"execution_count":
null
,
"execution_count":
223
,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"84593\n"
]
}
],
"source": [
"!echo $(ps ax | grep 'tensorboard --port 21277' | grep -v grep | awk '{print $1}')"
]
},
{
"cell_type": "code",
"execution_count": 202,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" 83294 pts/0 Ss+ 0:00 /bin/sh -c ps ax | grep tensorboard\n",
" 83296 pts/0 S+ 0:00 grep tensorboard\n",
"/home/paroutyj/fidle/GTSRB\n"
]
}
],
"source": [
"!ps ax | grep tensorboard\n",
"!pwd"
]
},
{
"cell_type": "markdown",
"metadata": {},
...
...
@@ -54,9 +125,17 @@
},
{
"cell_type": "code",
"execution_count":
null
,
"execution_count":
194
,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Ended (82555)\n"
]
}
],
"source": [
"%%bash\n",
"p=\"$(ps ax | grep 'tensorboard --port 21277' | grep -v grep | awk '{print $1}')\"\n",
...
...
@@ -103,7 +182,7 @@
},
{
"cell_type": "code",
"execution_count":
null
,
"execution_count":
1
,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -112,11 +191,35 @@
},
{
"cell_type": "code",
"execution_count":
null
,
"execution_count":
3
,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/html": [
"\n",
" <iframe id=\"tensorboard-frame-d4ce7dab09616bd4\" width=\"100%\" height=\"800\" frameborder=\"0\">\n",
" </iframe>\n",
" <script>\n",
" (function() {\n",
" const frame = document.getElementById(\"tensorboard-frame-d4ce7dab09616bd4\");\n",
" const url = new URL(\"/\", window.location);\n",
" url.port = 21277;\n",
" frame.src = url;\n",
" })();\n",
" </script>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"
notebook
.start('--port 21277 --host 0.0.0.0 --logdir ./run/logs')"
"
tsb
.start('--port 21277 --host 0.0.0.0 --logdir ./run/logs')"
]
},
{
...
...
%% Cell type:markdown id: tags:
Running Tensorboard from Jupyter lab
====================================
---
Introduction au Deep Learning (IDLE) - S. Arias, E. Maldonado, JL. Parouty - CNRS/SARI/DEVLOG - 2020
Vesion : 1.0
%% Cell type:markdown id: tags:
## Méthode 1 : Shell execute
**Start**
%% Cell type:code id: tags:
```
python
%%
bash
tensorboard_start
--
logdir
.
/
run
/
logs
```
%% Output
Tensorbord started with pid 84593
%% Cell type:code id: tags:
```
python
%%
bash
tensorboard_stop
```
%% Output
Tensorboard process not found...
%% Cell type:code id: tags:
```
python
%%
bash
# ---- Port number,
PORT_JPY
=
"
$(id -u)
"
PORT_TSB
=
"
$(( $PORT_J + 10000 ))
"
HOST_G
=
"
$(hostname)
"
SSH_CMD
=
"
/usr/bin/ssh -NL 8888:$HOST_G:$PORT_J -L 6006:$HOST_G:$PORT_T dahu.ciment
"
tensorboard
--
port
21277
--
host
0.0
.
0.0
--
logdir
.
/
run
/
logs
&>/
dev
/
null
&
```
%% Cell type:markdown id: tags:
**Check**
%% Cell type:code id: tags:
```
python
!
echo
$
(
ps
ax
|
grep
'
tensorboard --port 21277
'
|
grep
-
v
grep
|
awk
'
{print $1}
'
)
```
%% Output
84593
%% Cell type:code id: tags:
```
python
!
ps
ax
|
grep
tensorboard
!
pwd
```
%% Output
83294 pts/0 Ss+ 0:00 /bin/sh -c ps ax | grep tensorboard
83296 pts/0 S+ 0:00 grep tensorboard
/home/paroutyj/fidle/GTSRB
%% Cell type:markdown id: tags:
**Stop**
%% Cell type:code id: tags:
```
python
%%
bash
p
=
"
$(ps ax | grep
'
tensorboard --port 21277
'
| grep -v grep | awk
'
{print $1}
'
)
"
if
[
-
z
$
{
p
}
];
then
echo
"
No process
"
;
else
kill
$
p
;
echo
"
Ended ($p)
"
;
fi
```
%% Output
Ended (82555)
%% Cell type:markdown id: tags:
## Méthode 2 : Magic command
**Start**
%% Cell type:code id: tags:
```
python
%
load_ext
tensorboard
```
%% Cell type:code id: tags:
```
python
%
tensorboard
--
port
21277
--
host
0.0
.
0.0
--
logdir
.
/
run
/
logs
```
%% Cell type:markdown id: tags:
**Stop**
No way... use bash method
## Methode 3 : Tensorboard module
**Start**
%% Cell type:code id: tags:
```
python
import
tensorboard.notebook
as
tsb
```
%% Cell type:code id: tags:
```
python
notebook
.
start
(
'
--port 21277 --host 0.0.0.0 --logdir ./run/logs
'
)
tsb
.
start
(
'
--port 21277 --host 0.0.0.0 --logdir ./run/logs
'
)
```
%% Output
%% Cell type:markdown id: tags:
**Check**
%% Cell type:code id: tags:
```
python
a
=
tsb
.
list
()
```
%% Cell type:markdown id: tags:
**Stop**
No way... use bash method
...
...
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