Changing some things
This commit is contained in:
@@ -4,6 +4,7 @@ from src.utils.clearml import ClearMLHelper
|
|||||||
import plotly.graph_objects as go
|
import plotly.graph_objects as go
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from plotly.subplots import make_subplots
|
from plotly.subplots import make_subplots
|
||||||
|
from clearml.config import running_remotely
|
||||||
|
|
||||||
|
|
||||||
class Trainer:
|
class Trainer:
|
||||||
@@ -51,19 +52,23 @@ class Trainer:
|
|||||||
if not self.clearml_helper:
|
if not self.clearml_helper:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
task_name = input("Enter a task name: ")
|
|
||||||
if task_name == "":
|
|
||||||
task_name = "Untitled Task"
|
|
||||||
task = self.clearml_helper.get_task(task_name=task_name)
|
|
||||||
|
|
||||||
if self.debug:
|
task = self.clearml_helper.get_task(task_name="None")
|
||||||
task.add_tags("Debug")
|
|
||||||
|
# check if running remotely
|
||||||
|
|
||||||
|
if not running_remotely():
|
||||||
|
task_name = input("Enter a task name: ")
|
||||||
|
task.set_name(task_name)
|
||||||
|
|
||||||
# change_description = input("Enter a change description: ")
|
# change_description = input("Enter a change description: ")
|
||||||
change_description = ""
|
change_description = ""
|
||||||
if change_description:
|
if change_description:
|
||||||
task.set_comment(change_description)
|
task.set_comment(change_description)
|
||||||
|
|
||||||
|
if self.debug:
|
||||||
|
task.add_tags("Debug")
|
||||||
|
|
||||||
task.add_tags(self.model.__class__.__name__)
|
task.add_tags(self.model.__class__.__name__)
|
||||||
task.add_tags(self.criterion.__class__.__name__)
|
task.add_tags(self.criterion.__class__.__name__)
|
||||||
task.add_tags(self.optimizer.__class__.__name__)
|
task.add_tags(self.optimizer.__class__.__name__)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ class ClearMLHelper:
|
|||||||
self.project_name = project_name
|
self.project_name = project_name
|
||||||
|
|
||||||
def get_task(self, task_name: str = "Model Training"):
|
def get_task(self, task_name: str = "Model Training"):
|
||||||
|
Task.add_requirements("../../requirements.txt")
|
||||||
Task.ignore_requirements("torch")
|
Task.ignore_requirements("torch")
|
||||||
Task.ignore_requirements("torchvision")
|
Task.ignore_requirements("torchvision")
|
||||||
Task.ignore_requirements("tensorboard")
|
Task.ignore_requirements("tensorboard")
|
||||||
|
|||||||
Reference in New Issue
Block a user