Skip to content

Commit

Permalink
Log gpu model
Browse files Browse the repository at this point in the history
  • Loading branch information
m30m committed Feb 5, 2021
1 parent 7109d4a commit 2b10b56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Pitfall2-Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
" data.x = torch.ones((g.number_of_nodes(),1))\n",
" \n",
" for u in colored_nodes:\n",
" data.x[u,0]=0\n",
" data.x[u,0]=2\n",
"\n",
" return data"
]
Expand Down
8 changes: 8 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import subprocess
from enum import Enum

import mlflow
Expand All @@ -23,6 +24,13 @@ def main(experiment: Experiment = typer.Argument(..., help="Dataset to use"),
help="Convolution class. Can be GCNConv or GraphConv"),
):
mlflow.set_experiment(experiment.value)
try:
out = subprocess.Popen(['nvidia-smi', '-L'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
stdout, stderr = out.communicate()
gpu_model = stdout.decode().strip()
mlflow.log_param('GPU', gpu_model)
except FileNotFoundError:
pass
class_map = {
Experiment.infection: Infection,
Experiment.community: Community,
Expand Down

0 comments on commit 2b10b56

Please sign in to comment.