Added type_str to all training jobs
so that this is correctly traced
@@ -480,14 +480,13 @@ class TrainingJob1toN(TrainingJob):
)
config.log("Initializing 1-to-N training job...")
+ self.type_str = "1toN"
if self.__class__ == TrainingJob1toN:
for f in Job.job_created_hooks:
f(self)
def _prepare(self):
- self.type_str = "1toN"
-
# create sp and po label_coords (if not done before)
train_sp = self.dataset.index_1toN("train", "sp")
train_po = self.dataset.index_1toN("train", "po")
@@ -646,6 +645,7 @@ class TrainingJobNegativeSampling(TrainingJob1toN):
else:
self._num_negatives_o = 0
config.log("Sampling from 1-to-N ...")
+ self.type_str = "negative_sampling"
if self.__class__ == TrainingJobNegativeSampling:
for f in Job.job_created_hooks:
@@ -789,6 +789,7 @@ class TrainingJobNegativeSamplingLegacy(TrainingJob):
"Initializing negative sampling training job with "
"'{}' scoring function ...".format(self._score_func_type)
)
+ self.type_str = "negative_sampling"
if self.__class__ == TrainingJobNegativeSamplingLegacy:
for f in Job.job_created_hooks:
@@ -996,6 +997,7 @@ class TrainingJobSpo(TrainingJob):
super().__init__(config, dataset, parent_job)
self.is_prepared = False
config.log("Initializing spo training job...")
+ self.type_str = "spo"
if self.__class__ == TrainingJobSpo:
for f in Job.job_created_hooks:
