Example #1
0
 def __init__(self,
              model_id: str = '',
              model_name: str = '',
              vector_length: int = '',
              description: str = '',
              paper: str = '',
              repo: str = '',
              architecture: str = 'Not stated.',
              tasks: str = 'Not stated.',
              release_date: date = '',
              limitations: str = 'Not stated.',
              installation: str = 'Not stated.',
              example: str = 'Not stated.',
              markdown_filepath: str = '',
              **kwargs):
     """
         Model definition.
         Args:
             model_id: the identity of the model. Required for AutoEncoder.
             model_name: The name of the model
             vector_length: The length of the vector
             description: The description of the encoder
             paper: The paper which dictates the encoder
             repo: The repository fo the model
             architecture: The architecture of the model.
             task: The downstream task that the model was trained on
             limitations: The limitations of the encoder
             installation: How to isntall the encoder.
             example: The example of the encoder
     """
     self.model_id = model_id
     self.model_name = model_name
     self.vector_length = vector_length
     self.description = description
     self.paper = paper
     self.repo = repo
     self.architecture = architecture
     self.tasks = tasks
     self.release_date = release_date.__str__(
     ) if release_date is not None else None
     self.limitations = limitations
     self.installation = installation
     self.example = example
     self.markdown_filepath = markdown_filepath
     for k, v in kwargs.items():
         # assert( k in self.__class__.__allowed )
         setattr(self, k, v)
     if markdown_filepath != '':
         self.from_markdown(markdown_filepath)
Example #2
0
 def get_logfile_name(self, log_date: date, log_number: int) -> str:
     return self.logDir + '/' + log_date.__str__() + "_" + str(
         log_number) + ".txt"
Example #3
0
 def get_boundaries(self, from_date: date, to_date: date) -> (int, int):
     from_id = self._git.search_repositories(
         query=from_date.__str__())[0].id
     to_id = self._git.search_repositories(query=to_date.__str__())[0].id
     return from_id, to_id