File size: 2,504 Bytes
e564941
 
 
 
042a686
e564941
 
 
 
042a686
e564941
 
 
 
 
 
 
042a686
e564941
 
 
 
 
 
 
042a686
e564941
 
 
042a686
e564941
042a686
e564941
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
042a686
e564941
 
 
 
 
 
042a686
e564941
 
 
 
 
 
 
 
 
 
 
 
14c70a0
 
 
 
 
 
 
 
e564941
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "ae45e44e-a11c-43ef-b830-c7a58a72f51e",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "import nersc_tensorboard_helper\n",
    "%load_ext tensorboard"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "a5c088b8-5051-402f-b4ec-2b684ad5a952",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "      <iframe id=\"tensorboard-frame-7f9f2d9b643f0d7b\" width=\"100%\" height=\"800\" frameborder=\"0\">\n",
       "      </iframe>\n",
       "      <script>\n",
       "        (function() {\n",
       "          const frame = document.getElementById(\"tensorboard-frame-7f9f2d9b643f0d7b\");\n",
       "          const url = new URL(\"/\", window.location);\n",
       "          const port = 40725;\n",
       "          if (port) {\n",
       "            url.port = port;\n",
       "          }\n",
       "          frame.src = url;\n",
       "        })();\n",
       "      </script>\n",
       "    "
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%tensorboard --logdir logs --port 0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "2f76c0a9-2218-4073-86aa-f4f655d7642f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<a href=\"https://jupyter.nersc.gov/user/binxia/perlmutter-login-node-base/proxy/40725/\">https://jupyter.nersc.gov/user/binxia/perlmutter-login-node-base/proxy/40725/</a>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "nersc_tensorboard_helper.tb_address()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8ca783fe-501c-4e12-b769-f037b4671ef0",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "tensorflow-2.15.0",
   "language": "python",
   "name": "tensorflow-2.15.0"
  },
  "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.9.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}