コード例 #1
0
    def __repr__(self):
        self._refresh_cache()
        msg = self._msg

        return '\n'.join((
            "name: {}".format(msg.name),
            "url: {}://{}/{}/datasets/{}/summary".format(self._conn.scheme, self._conn.socket, self.workspace, self.id),
            "time created: {}".format(_utils.timestamp_to_str(int(msg.time_created))),
            "time updated: {}".format(_utils.timestamp_to_str(int(msg.time_updated))),
            "description: {}".format(msg.description),
            "tags: {}".format(msg.tags),
            "attributes: {}".format(_utils.unravel_key_values(msg.attributes)),
            "id: {}".format(msg.id),
        ))
コード例 #2
0
    def __repr__(self):
        self._refresh_cache()
        msg = self._msg

        return '\n'.join((
            "name: {}".format(msg.name),
            "url: {}://{}/{}/registry/{}".format(self._conn.scheme,
                                                 self._conn.socket,
                                                 self.workspace, self.id),
            "time created: {}".format(
                _utils.timestamp_to_str(int(msg.time_created))),
            "time updated: {}".format(
                _utils.timestamp_to_str(int(msg.time_updated))),
            "description: {}".format(msg.description),
            "labels: {}".format(msg.labels),
            "id: {}".format(msg.id),
        ))
コード例 #3
0
    def __repr__(self):
        self._refresh_cache()
        msg = self._msg

        return '\n'.join((
            "version: {}".format(msg.version),
            # TODO: "url: {}://{}/{}/datasets/{}/summary".format(self._conn.scheme, self._conn.socket, self.workspace, self.id),
            "time created: {}".format(
                _utils.timestamp_to_str(int(msg.time_logged))),
            "time updated: {}".format(
                _utils.timestamp_to_str(int(msg.time_updated))),
            "description: {}".format(msg.description),
            "tags: {}".format(msg.tags),
            "attributes: {}".format(_utils.unravel_key_values(msg.attributes)),
            "id: {}".format(msg.id),
            "content:",
            "{}".format(self.get_content()),  # TODO: increase indentation
        ))
コード例 #4
0
 def __repr__(self):
     self._refresh_cache()
     msg = self._msg
     return "\n\t".join(
         (
             "Notification Channel",
             "name: {}".format(msg.name),
             "id: {}".format(msg.id),
             "created: {}".format(_utils.timestamp_to_str(msg.created_at_millis)),
             "updated: {}".format(_utils.timestamp_to_str(msg.updated_at_millis)),
             "channel: {}".format(
                 # TODO: use a `channel` property that returns the actual class
                 _AlertService.NotificationChannelTypeEnum.NotificationChannelType.Name(
                     msg.type
                 )
             ),
         )
     )
コード例 #5
0
 def _get_info_list(self, model_name):
     if model_name is None:
         id_or_name = str(self._msg.registered_model_id)
     else:
         id_or_name = model_name
     return [
         self._msg.version,
         str(self.id),
         id_or_name,
         _utils.timestamp_to_str(self._msg.time_updated),
     ]
コード例 #6
0
    def __repr__(self):
        self._refresh_cache()
        msg = self._msg
        artifact_keys = self.get_artifact_keys()
        if self.has_model:
            artifact_keys.append(self._MODEL_KEY)

        return "\n".join((
            "version: {}".format(msg.version),
            "stage: {}".format(self.stage),
            "lock level: {}".format(
                _RegistryService.ModelVersionLockLevelEnum.
                ModelVersionLockLevel.Name(msg.lock_level).lower()),
            "url: {}://{}/{}/registry/{}/versions/{}".format(
                self._conn.scheme,
                self._conn.socket,
                self.workspace,
                self.registered_model_id,
                self.id,
            ),
            "time created: {}".format(
                _utils.timestamp_to_str(int(msg.time_created))),
            "time updated: {}".format(
                _utils.timestamp_to_str(int(msg.time_updated))),
            "description: {}".format(msg.description),
            "labels: {}".format(msg.labels),
            "attributes: {}".format({
                key: val
                for key, val in _utils.unravel_key_values(
                    msg.attributes).items()
                if not key.startswith(_deployable_entity._INTERNAL_ATTR_PREFIX)
            }),
            "id: {}".format(msg.id),
            "registered model id: {}".format(msg.registered_model_id),
            "experiment run id: {}".format(msg.experiment_run_id),
            # "archived status: {}".format(msg.archived == _CommonCommonService.TernaryEnum.TRUE),
            "artifact keys: {}".format(artifact_keys),
        ))
コード例 #7
0
 def _get_info_list(self):
     return [
         self._msg.name,
         str(self.id),
         _utils.timestamp_to_str(self._msg.time_updated)
     ]