Skip to content

Commit

Permalink
Fix dataset _to_mlflow_entity (#11722)
Browse files Browse the repository at this point in the history
Signed-off-by: Serena Ruan <serena.rxy@gmail.com>
  • Loading branch information
serena-ruan committed Apr 16, 2024
1 parent 9fbd6a4 commit 00f8b47
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mlflow/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ def _to_mlflow_entity(self) -> DatasetEntity:
Returns:
A `mlflow.entities.Dataset` instance representing the dataset.
"""
dataset_json = json.loads(self.to_json())
dataset_dict = self.to_dict()
return DatasetEntity(
name=dataset_json["name"],
digest=dataset_json["digest"],
source_type=dataset_json["source_type"],
source=dataset_json["source"],
schema=dataset_json.get("schema"),
profile=dataset_json.get("profile"),
name=dataset_dict["name"],
digest=dataset_dict["digest"],
source_type=dataset_dict["source_type"],
source=dataset_dict["source"],
schema=dataset_dict.get("schema"),
profile=dataset_dict.get("profile"),
)

0 comments on commit 00f8b47

Please sign in to comment.