mirror of
https://github.com/clearml/clearml
synced 2025-02-12 07:35:08 +00:00
Fix dataset CSV files are not previewed properly
This commit is contained in:
parent
72b341ee51
commit
487fe75946
@ -2917,12 +2917,15 @@ class Dataset(object):
|
|||||||
if artifact is not None:
|
if artifact is not None:
|
||||||
# noinspection PyBroadException
|
# noinspection PyBroadException
|
||||||
try:
|
try:
|
||||||
# we do not use report_table if default_upload_destination is set because it will
|
# we only use report_table if default_upload_destination is not set
|
||||||
# not upload the sample to that destination, use report_media instead
|
# (it is the same as the file server)
|
||||||
if isinstance(artifact, pd.DataFrame) and not self._task.get_logger().get_default_upload_destination():
|
# because it will not upload the sample to that destination.
|
||||||
self._task.get_logger().report_table(
|
# use report_media instead to not leak data
|
||||||
"Tables", "summary", table_plot=artifact
|
if (
|
||||||
)
|
isinstance(artifact, pd.DataFrame)
|
||||||
|
and self._task.get_logger().get_default_upload_destination() == Session.get_files_server_host()
|
||||||
|
):
|
||||||
|
self._task.get_logger().report_table("Tables", "summary", table_plot=artifact)
|
||||||
else:
|
else:
|
||||||
self._task.get_logger().report_media(
|
self._task.get_logger().report_media(
|
||||||
"Tables", file_name, stream=artifact.to_csv(index=False), file_extension=".txt"
|
"Tables", file_name, stream=artifact.to_csv(index=False), file_extension=".txt"
|
||||||
|
Loading…
Reference in New Issue
Block a user