diff --git a/packages/syft/src/syft/service/dataset/dataset.py b/packages/syft/src/syft/service/dataset/dataset.py index 45bb7059659..364d5dd6ea4 100644 --- a/packages/syft/src/syft/service/dataset/dataset.py +++ b/packages/syft/src/syft/service/dataset/dataset.py @@ -141,7 +141,7 @@ class Asset(SyftObject): mock_is_real: bool = False shape: Optional[Tuple] created_at: DateTime = DateTime.now() - uploader: Contributor + uploader: Optional[Contributor] __repr_attrs__ = ["name", "shape"] @@ -165,11 +165,12 @@ def _repr_html_(self) -> Any: # relative from ...service.action.action_object import ActionObject - uploaded_by_line = "n/a" - if len(self.contributors) > 0: - uploaded_by_line = ( - f"
Uploaded by: {self.uploader.name}
" - ) + uploaded_by_line = ( + f"Uploaded by: {self.uploader.name} ({self.uploader.email})
" + if self.uploader + else "" + ) + if isinstance(self.data, ActionObject): data_table_line = itables.to_html_datatable( df=self.data.syft_action_data, css=itables_css @@ -494,12 +495,15 @@ def _coll_repr_(self) -> Dict[str, Any]: } def _repr_html_(self) -> Any: - uploaded_by_line = "n/a" - if len(self.contributors) > 0: - uploaded_by_line = ( + uploaded_by_line = ( + ( "" - + f"Uploaded by:{self.uploader.name}
" + + f"Uploaded by:{self.uploader.name} ({self.uploader.email})" ) + if self.uploader + else "" + ) + return f"""