Changes to allow remote execution

This commit is contained in:
Victor Mylle
2023-11-25 23:36:57 +00:00
parent 300f268286
commit a8db70e86d
7 changed files with 4500091 additions and 4 deletions

View File

@@ -6,7 +6,6 @@ class PinballLoss(nn.Module):
def __init__(self, quantiles):
super(PinballLoss, self).__init__()
self.quantiles_tensor = torch.tensor(quantiles, dtype=torch.float32)
self.quantiles = self.quantiles_tensor.tolist()
def forward(self, pred, target):
error = target - pred

View File

@@ -67,9 +67,10 @@ class AutoRegressiveQuantileTrainer(AutoRegressiveTrainer):
clearml_helper: ClearMLHelper = None,
debug: bool = True,
):
self.quantiles = quantiles
quantiles_tensor = torch.tensor(quantiles)
quantiles_tensor = quantiles_tensor.to(device)
self.quantiles = quantiles
criterion = PinballLoss(quantiles=quantiles_tensor)
super().__init__(

View File

@@ -76,6 +76,7 @@ class Trainer:
task.connect(self.optimizer, name="optimizer")
task.connect(self.criterion, name="criterion")
task.connect(self.data_processor, name="data_processor")
task.connect(self, name="trainer")
task.connect(self.data_processor.data_config, name="data_features")

View File

@@ -6,5 +6,5 @@ class ClearMLHelper:
def get_task(self, task_name: str = "Model Training"):
task = Task.init(project_name=self.project_name, task_name=task_name, continue_last_task=False)
task.set_base_docker(f"pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime")
task.set_base_docker(f"docker.io/clearml/pytorch-cuda-gcc:2.0.0-cuda11.7-cudnn8-runtime --env GIT_SSL_NO_VERIFY=true --env CLEARML_AGENT_GIT_USER=VictorMylle --env CLEARML_AGENT_GIT_PASS=Voetballer1" )
return task