We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG]mlflow.log_input will export dataset to json and import dataset again
### Issues Policy acknowledgement

- [X] I have read and agree to submit bug reports in accordance with the [issues policy](https://www.github.com/mlflow/mlflow/blob/master/ISSUE_POLICY.md)

### Where did you encounter this bug?

Local machine

### Willingness to contribute

No. I cannot contribute a bug fix at this time.

### MLflow version

- Client: 2.11.3
- Tracking server: 2.11.3


### System information

- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Ubuntu 18.04 (WSL2)
- **Python version**: 3.10


### Describe the problem

run `mlflow.log_input(dataset, context='training')` will export dataset to json and import dataset again

`mlflow.log_input(dataset, context='training')` will call
`dataset_input = DatasetInput(dataset=dataset._to_mlflow_entity(), tags=tags_to_log)` will cal
```
def _to_mlflow_entity(self) -> DatasetEntity:
    """
    Returns:
        A `mlflow.entities.Dataset` instance representing the dataset.
    """
    dataset_json = json.loads(self.to_json())
    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"),
    )
```
`dataset_json = json.loads(self.to_json())` will export dataset to json and import dataset again


Dataset dinifination
```
class MyDataset(Dataset):
    def __init__(self, data_dir, segment_len=128):
        self.data_dir = data_dir
        self.segment_len = segment_len

        # Load the mapping from speaker name to their corresponding id.
        mapping_path = Path(data_dir) / "mapping.json"
        mapping = json.load(mapping_path.open())
        self.speaker2id = mapping["speaker2id"]

        # Load metadata of training data.
        metadata_path = Path(data_dir) / "metadata.json"
        metadata = json.load(open(metadata_path))["speakers"]

        # Get the total number of speaker.
        self.speaker_num = len(metadata.keys())
        self.data = []
        for speaker in metadata.keys():
            for utterances in metadata[speaker]:
                self.data.append([utterances["feature_path"], self.speaker2id[speaker]])
```


### Tracking information

<!-- PLEASE KEEP BACKTICKS AND CHECK PREVIEW -->
```shell
REPLACE_ME
```


### Code to reproduce issue

<!-- PLEASE KEEP BACKTICKS AND CHECK PREVIEW -->
```
class MyDataset(Dataset):
    def __init__(self, data_dir, segment_len=128):
        self.data_dir = data_dir
        self.segment_len = segment_len

        # Load the mapping from speaker name to their corresponding id.
        mapping_path = Path(data_dir) / "mapping.json"
        mapping = json.load(mapping_path.open())
        self.speaker2id = mapping["speaker2id"]

        # Load metadata of training data.
        metadata_path = Path(data_dir) / "metadata.json"
        metadata = json.load(open(metadata_path))["speakers"]

        # Get the total number of speaker.
        self.speaker_num = len(metadata.keys())
        self.data = []
        for speaker in metadata.keys():
            for utterances in metadata[speaker]:
                self.data.append([utterances["feature_path"], self.speaker2id[speaker]])

        # Create a DataFrame from the data
        df = pd.DataFrame(self.data, columns=['feature_path', 'speaker_id'])
        # Create a Dataset object from the DataFrame
        dataset = mlflow.data.from_pandas(df, source=data_dir)
        # Log the Dataset object
        mlflow.log_input(dataset, context='training')

dataset = MyDataset("./Dataset")
```

Data is [here](https://drive.google.com/drive/folders/1vI1kuLB-q1VilIftiwnPOCAeOOFfBZge?usp=sharing)


### Stack trace

<!-- PLEASE KEEP BACKTICKS AND CHECK PREVIEW -->
```
REPLACE_ME
```


### Other info / logs

<!-- PLEASE KEEP BACKTICKS AND CHECK PREVIEW -->
```
REPLACE_ME
```


### What component(s) does this bug affect?

- [X] `area/artifacts`: Artifact stores and artifact logging
- [ ] `area/build`: Build and test infrastructure for MLflow
- [ ] `area/deployments`: MLflow Deployments client APIs, server, and third-party Deployments integrations
- [ ] `area/docs`: MLflow documentation pages
- [ ] `area/examples`: Example code
- [ ] `area/model-registry`: Model Registry service, APIs, and the fluent client calls for Model Registry
- [ ] `area/models`: MLmodel format, model serialization/deserialization, flavors
- [ ] `area/recipes`: Recipes, Recipe APIs, Recipe configs, Recipe Templates
- [ ] `area/projects`: MLproject format, project running backends
- [ ] `area/scoring`: MLflow Model server, model deployment tools, Spark UDFs
- [ ] `area/server-infra`: MLflow Tracking server backend
- [ ] `area/tracking`: Tracking Service, tracking client APIs, autologging

### What interface(s) does this bug affect?

- [ ] `area/uiux`: Front-end, user experience, plotting, JavaScript, JavaScript dev server
- [ ] `area/docker`: Docker use across MLflow's components, such as MLflow Projects and MLflow Models
- [ ] `area/sqlalchemy`: Use of SQLAlchemy in the Tracking Service or Model Registry
- [ ] `area/windows`: Windows support

### What language(s) does this bug affect?

- [ ] `language/r`: R APIs and clients
- [ ] `language/java`: Java APIs and clients
- [ ] `language/new`: Proposals for new client languages

### What integration(s) does this bug affect?

- [ ] `integrations/azure`: Azure and Azure ML integrations
- [ ] `integrations/sagemaker`: SageMaker integrations
- [ ] `integrations/databricks`: Databricks integrations

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mlflow/data/dataset.py`
Content:
```
1 import json
2 from abc import abstractmethod
3 from typing import Any, Dict, Optional
4 
5 from mlflow.data.dataset_source import DatasetSource
6 from mlflow.entities import Dataset as DatasetEntity
7 
8 
9 class Dataset:
10     """
11     Represents a dataset for use with MLflow Tracking, including the name, digest (hash),
12     schema, and profile of the dataset as well as source information (e.g. the S3 bucket or
13     managed Delta table from which the dataset was derived). Most datasets expose features
14     and targets for training and evaluation as well.
15     """
16 
17     def __init__(
18         self, source: DatasetSource, name: Optional[str] = None, digest: Optional[str] = None
19     ):
20         """
21         Base constructor for a dataset. All subclasses must call this constructor.
22         """
23         self._name = name
24         self._source = source
25         # Note: Subclasses should call super() once they've initialized all of
26         # the class attributes necessary for digest computation
27         self._digest = digest or self._compute_digest()
28 
29     @abstractmethod
30     def _compute_digest(self) -> str:
31         """Computes a digest for the dataset. Called if the user doesn't supply
32         a digest when constructing the dataset.
33 
34         Returns:
35             A string digest for the dataset. We recommend a maximum digest length
36             of 10 characters with an ideal length of 8 characters.
37 
38         """
39 
40     @abstractmethod
41     def to_dict(self) -> Dict[str, str]:
42         """Create config dictionary for the dataset.
43 
44         Subclasses should override this method to provide additional fields in the config dict,
45         e.g., schema, profile, etc.
46 
47         Returns a string dictionary containing the following fields: name, digest, source, source
48         type.
49         """
50         return {
51             "name": self.name,
52             "digest": self.digest,
53             "source": self.source.to_json(),
54             "source_type": self.source._get_source_type(),
55         }
56 
57     def to_json(self) -> str:
58         """
59         Obtains a JSON string representation of the :py:class:`Dataset
60         <mlflow.data.dataset.Dataset>`.
61 
62         Returns:
63             A JSON string representation of the :py:class:`Dataset <mlflow.data.dataset.Dataset>`.
64         """
65 
66         return json.dumps(self.to_dict())
67 
68     @property
69     def name(self) -> str:
70         """
71         The name of the dataset, e.g. ``"iris_data"``, ``"myschema.mycatalog.mytable@v1"``, etc.
72         """
73         if self._name is not None:
74             return self._name
75         else:
76             return "dataset"
77 
78     @property
79     def digest(self) -> str:
80         """
81         A unique hash or fingerprint of the dataset, e.g. ``"498c7496"``.
82         """
83         return self._digest
84 
85     @property
86     def source(self) -> DatasetSource:
87         """
88         Information about the dataset's source, represented as an instance of
89         :py:class:`DatasetSource <mlflow.data.dataset_source.DatasetSource>`. For example, this
90         may be the S3 location or the name of the managed Delta Table from which the dataset
91         was derived.
92         """
93         return self._source
94 
95     @property
96     @abstractmethod
97     def profile(self) -> Optional[Any]:
98         """
99         Optional summary statistics for the dataset, such as the number of rows in a table, the
100         mean / median / std of each table column, etc.
101         """
102 
103     @property
104     @abstractmethod
105     def schema(self) -> Optional[Any]:
106         """
107         Optional dataset schema, such as an instance of :py:class:`mlflow.types.Schema` representing
108         the features and targets of the dataset.
109         """
110 
111     def _to_mlflow_entity(self) -> DatasetEntity:
112         """
113         Returns:
114             A `mlflow.entities.Dataset` instance representing the dataset.
115         """
116         dataset_json = json.loads(self.to_json())
117         return DatasetEntity(
118             name=dataset_json["name"],
119             digest=dataset_json["digest"],
120             source_type=dataset_json["source_type"],
121             source=dataset_json["source"],
122             schema=dataset_json.get("schema"),
123             profile=dataset_json.get("profile"),
124         )
125
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mlflow/data/dataset.py b/mlflow/data/dataset.py
--- a/mlflow/data/dataset.py
+++ b/mlflow/data/dataset.py
@@ -113,12 +113,12 @@
         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"),
         )

{"golden_diff": "diff --git a/mlflow/data/dataset.py b/mlflow/data/dataset.py\n--- a/mlflow/data/dataset.py\n+++ b/mlflow/data/dataset.py\n@@ -113,12 +113,12 @@\n         Returns:\n             A `mlflow.entities.Dataset` instance representing the dataset.\n         \"\"\"\n-        dataset_json = json.loads(self.to_json())\n+        dataset_dict = self.to_dict()\n         return DatasetEntity(\n-            name=dataset_json[\"name\"],\n-            digest=dataset_json[\"digest\"],\n-            source_type=dataset_json[\"source_type\"],\n-            source=dataset_json[\"source\"],\n-            schema=dataset_json.get(\"schema\"),\n-            profile=dataset_json.get(\"profile\"),\n+            name=dataset_dict[\"name\"],\n+            digest=dataset_dict[\"digest\"],\n+            source_type=dataset_dict[\"source_type\"],\n+            source=dataset_dict[\"source\"],\n+            schema=dataset_dict.get(\"schema\"),\n+            profile=dataset_dict.get(\"profile\"),\n         )\n", "issue": "[BUG]mlflow.log_input will export dataset to json and import dataset again\n### Issues Policy acknowledgement\n\n- [X] I have read and agree to submit bug reports in accordance with the [issues policy](https://www.github.com/mlflow/mlflow/blob/master/ISSUE_POLICY.md)\n\n### Where did you encounter this bug?\n\nLocal machine\n\n### Willingness to contribute\n\nNo. I cannot contribute a bug fix at this time.\n\n### MLflow version\n\n- Client: 2.11.3\r\n- Tracking server: 2.11.3\r\n\n\n### System information\n\n- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Ubuntu 18.04 (WSL2)\r\n- **Python version**: 3.10\r\n\n\n### Describe the problem\n\nrun `mlflow.log_input(dataset, context='training')` will export dataset to json and import dataset again\r\n\r\n`mlflow.log_input(dataset, context='training')` will call\r\n`dataset_input = DatasetInput(dataset=dataset._to_mlflow_entity(), tags=tags_to_log)` will cal\r\n```\r\ndef _to_mlflow_entity(self) -> DatasetEntity:\r\n    \"\"\"\r\n    Returns:\r\n        A `mlflow.entities.Dataset` instance representing the dataset.\r\n    \"\"\"\r\n    dataset_json = json.loads(self.to_json())\r\n    return DatasetEntity(\r\n        name=dataset_json[\"name\"],\r\n        digest=dataset_json[\"digest\"],\r\n        source_type=dataset_json[\"source_type\"],\r\n        source=dataset_json[\"source\"],\r\n        schema=dataset_json.get(\"schema\"),\r\n        profile=dataset_json.get(\"profile\"),\r\n    )\r\n```\r\n`dataset_json = json.loads(self.to_json())` will export dataset to json and import dataset again\r\n\r\n\r\nDataset dinifination\r\n```\r\nclass MyDataset(Dataset):\r\n    def __init__(self, data_dir, segment_len=128):\r\n        self.data_dir = data_dir\r\n        self.segment_len = segment_len\r\n\r\n        # Load the mapping from speaker name to their corresponding id.\r\n        mapping_path = Path(data_dir) / \"mapping.json\"\r\n        mapping = json.load(mapping_path.open())\r\n        self.speaker2id = mapping[\"speaker2id\"]\r\n\r\n        # Load metadata of training data.\r\n        metadata_path = Path(data_dir) / \"metadata.json\"\r\n        metadata = json.load(open(metadata_path))[\"speakers\"]\r\n\r\n        # Get the total number of speaker.\r\n        self.speaker_num = len(metadata.keys())\r\n        self.data = []\r\n        for speaker in metadata.keys():\r\n            for utterances in metadata[speaker]:\r\n                self.data.append([utterances[\"feature_path\"], self.speaker2id[speaker]])\r\n```\r\n\n\n### Tracking information\n\n<!-- PLEASE KEEP BACKTICKS AND CHECK PREVIEW -->\r\n```shell\r\nREPLACE_ME\r\n```\r\n\n\n### Code to reproduce issue\n\n<!-- PLEASE KEEP BACKTICKS AND CHECK PREVIEW -->\r\n```\r\nclass MyDataset(Dataset):\r\n    def __init__(self, data_dir, segment_len=128):\r\n        self.data_dir = data_dir\r\n        self.segment_len = segment_len\r\n\r\n        # Load the mapping from speaker name to their corresponding id.\r\n        mapping_path = Path(data_dir) / \"mapping.json\"\r\n        mapping = json.load(mapping_path.open())\r\n        self.speaker2id = mapping[\"speaker2id\"]\r\n\r\n        # Load metadata of training data.\r\n        metadata_path = Path(data_dir) / \"metadata.json\"\r\n        metadata = json.load(open(metadata_path))[\"speakers\"]\r\n\r\n        # Get the total number of speaker.\r\n        self.speaker_num = len(metadata.keys())\r\n        self.data = []\r\n        for speaker in metadata.keys():\r\n            for utterances in metadata[speaker]:\r\n                self.data.append([utterances[\"feature_path\"], self.speaker2id[speaker]])\r\n\r\n        # Create a DataFrame from the data\r\n        df = pd.DataFrame(self.data, columns=['feature_path', 'speaker_id'])\r\n        # Create a Dataset object from the DataFrame\r\n        dataset = mlflow.data.from_pandas(df, source=data_dir)\r\n        # Log the Dataset object\r\n        mlflow.log_input(dataset, context='training')\r\n\r\ndataset = MyDataset(\"./Dataset\")\r\n```\r\n\r\nData is [here](https://drive.google.com/drive/folders/1vI1kuLB-q1VilIftiwnPOCAeOOFfBZge?usp=sharing)\r\n\n\n### Stack trace\n\n<!-- PLEASE KEEP BACKTICKS AND CHECK PREVIEW -->\r\n```\r\nREPLACE_ME\r\n```\r\n\n\n### Other info / logs\n\n<!-- PLEASE KEEP BACKTICKS AND CHECK PREVIEW -->\r\n```\r\nREPLACE_ME\r\n```\r\n\n\n### What component(s) does this bug affect?\n\n- [X] `area/artifacts`: Artifact stores and artifact logging\n- [ ] `area/build`: Build and test infrastructure for MLflow\n- [ ] `area/deployments`: MLflow Deployments client APIs, server, and third-party Deployments integrations\n- [ ] `area/docs`: MLflow documentation pages\n- [ ] `area/examples`: Example code\n- [ ] `area/model-registry`: Model Registry service, APIs, and the fluent client calls for Model Registry\n- [ ] `area/models`: MLmodel format, model serialization/deserialization, flavors\n- [ ] `area/recipes`: Recipes, Recipe APIs, Recipe configs, Recipe Templates\n- [ ] `area/projects`: MLproject format, project running backends\n- [ ] `area/scoring`: MLflow Model server, model deployment tools, Spark UDFs\n- [ ] `area/server-infra`: MLflow Tracking server backend\n- [ ] `area/tracking`: Tracking Service, tracking client APIs, autologging\n\n### What interface(s) does this bug affect?\n\n- [ ] `area/uiux`: Front-end, user experience, plotting, JavaScript, JavaScript dev server\n- [ ] `area/docker`: Docker use across MLflow's components, such as MLflow Projects and MLflow Models\n- [ ] `area/sqlalchemy`: Use of SQLAlchemy in the Tracking Service or Model Registry\n- [ ] `area/windows`: Windows support\n\n### What language(s) does this bug affect?\n\n- [ ] `language/r`: R APIs and clients\n- [ ] `language/java`: Java APIs and clients\n- [ ] `language/new`: Proposals for new client languages\n\n### What integration(s) does this bug affect?\n\n- [ ] `integrations/azure`: Azure and Azure ML integrations\n- [ ] `integrations/sagemaker`: SageMaker integrations\n- [ ] `integrations/databricks`: Databricks integrations\n", "before_files": [{"content": "import json\nfrom abc import abstractmethod\nfrom typing import Any, Dict, Optional\n\nfrom mlflow.data.dataset_source import DatasetSource\nfrom mlflow.entities import Dataset as DatasetEntity\n\n\nclass Dataset:\n    \"\"\"\n    Represents a dataset for use with MLflow Tracking, including the name, digest (hash),\n    schema, and profile of the dataset as well as source information (e.g. the S3 bucket or\n    managed Delta table from which the dataset was derived). Most datasets expose features\n    and targets for training and evaluation as well.\n    \"\"\"\n\n    def __init__(\n        self, source: DatasetSource, name: Optional[str] = None, digest: Optional[str] = None\n    ):\n        \"\"\"\n        Base constructor for a dataset. All subclasses must call this constructor.\n        \"\"\"\n        self._name = name\n        self._source = source\n        # Note: Subclasses should call super() once they've initialized all of\n        # the class attributes necessary for digest computation\n        self._digest = digest or self._compute_digest()\n\n    @abstractmethod\n    def _compute_digest(self) -> str:\n        \"\"\"Computes a digest for the dataset. Called if the user doesn't supply\n        a digest when constructing the dataset.\n\n        Returns:\n            A string digest for the dataset. We recommend a maximum digest length\n            of 10 characters with an ideal length of 8 characters.\n\n        \"\"\"\n\n    @abstractmethod\n    def to_dict(self) -> Dict[str, str]:\n        \"\"\"Create config dictionary for the dataset.\n\n        Subclasses should override this method to provide additional fields in the config dict,\n        e.g., schema, profile, etc.\n\n        Returns a string dictionary containing the following fields: name, digest, source, source\n        type.\n        \"\"\"\n        return {\n            \"name\": self.name,\n            \"digest\": self.digest,\n            \"source\": self.source.to_json(),\n            \"source_type\": self.source._get_source_type(),\n        }\n\n    def to_json(self) -> str:\n        \"\"\"\n        Obtains a JSON string representation of the :py:class:`Dataset\n        <mlflow.data.dataset.Dataset>`.\n\n        Returns:\n            A JSON string representation of the :py:class:`Dataset <mlflow.data.dataset.Dataset>`.\n        \"\"\"\n\n        return json.dumps(self.to_dict())\n\n    @property\n    def name(self) -> str:\n        \"\"\"\n        The name of the dataset, e.g. ``\"iris_data\"``, ``\"myschema.mycatalog.mytable@v1\"``, etc.\n        \"\"\"\n        if self._name is not None:\n            return self._name\n        else:\n            return \"dataset\"\n\n    @property\n    def digest(self) -> str:\n        \"\"\"\n        A unique hash or fingerprint of the dataset, e.g. ``\"498c7496\"``.\n        \"\"\"\n        return self._digest\n\n    @property\n    def source(self) -> DatasetSource:\n        \"\"\"\n        Information about the dataset's source, represented as an instance of\n        :py:class:`DatasetSource <mlflow.data.dataset_source.DatasetSource>`. For example, this\n        may be the S3 location or the name of the managed Delta Table from which the dataset\n        was derived.\n        \"\"\"\n        return self._source\n\n    @property\n    @abstractmethod\n    def profile(self) -> Optional[Any]:\n        \"\"\"\n        Optional summary statistics for the dataset, such as the number of rows in a table, the\n        mean / median / std of each table column, etc.\n        \"\"\"\n\n    @property\n    @abstractmethod\n    def schema(self) -> Optional[Any]:\n        \"\"\"\n        Optional dataset schema, such as an instance of :py:class:`mlflow.types.Schema` representing\n        the features and targets of the dataset.\n        \"\"\"\n\n    def _to_mlflow_entity(self) -> DatasetEntity:\n        \"\"\"\n        Returns:\n            A `mlflow.entities.Dataset` instance representing the dataset.\n        \"\"\"\n        dataset_json = json.loads(self.to_json())\n        return DatasetEntity(\n            name=dataset_json[\"name\"],\n            digest=dataset_json[\"digest\"],\n            source_type=dataset_json[\"source_type\"],\n            source=dataset_json[\"source\"],\n            schema=dataset_json.get(\"schema\"),\n            profile=dataset_json.get(\"profile\"),\n        )\n", "path": "mlflow/data/dataset.py"}], "after_files": [{"content": "import json\nfrom abc import abstractmethod\nfrom typing import Any, Dict, Optional\n\nfrom mlflow.data.dataset_source import DatasetSource\nfrom mlflow.entities import Dataset as DatasetEntity\n\n\nclass Dataset:\n    \"\"\"\n    Represents a dataset for use with MLflow Tracking, including the name, digest (hash),\n    schema, and profile of the dataset as well as source information (e.g. the S3 bucket or\n    managed Delta table from which the dataset was derived). Most datasets expose features\n    and targets for training and evaluation as well.\n    \"\"\"\n\n    def __init__(\n        self, source: DatasetSource, name: Optional[str] = None, digest: Optional[str] = None\n    ):\n        \"\"\"\n        Base constructor for a dataset. All subclasses must call this constructor.\n        \"\"\"\n        self._name = name\n        self._source = source\n        # Note: Subclasses should call super() once they've initialized all of\n        # the class attributes necessary for digest computation\n        self._digest = digest or self._compute_digest()\n\n    @abstractmethod\n    def _compute_digest(self) -> str:\n        \"\"\"Computes a digest for the dataset. Called if the user doesn't supply\n        a digest when constructing the dataset.\n\n        Returns:\n            A string digest for the dataset. We recommend a maximum digest length\n            of 10 characters with an ideal length of 8 characters.\n\n        \"\"\"\n\n    @abstractmethod\n    def to_dict(self) -> Dict[str, str]:\n        \"\"\"Create config dictionary for the dataset.\n\n        Subclasses should override this method to provide additional fields in the config dict,\n        e.g., schema, profile, etc.\n\n        Returns a string dictionary containing the following fields: name, digest, source, source\n        type.\n        \"\"\"\n        return {\n            \"name\": self.name,\n            \"digest\": self.digest,\n            \"source\": self.source.to_json(),\n            \"source_type\": self.source._get_source_type(),\n        }\n\n    def to_json(self) -> str:\n        \"\"\"\n        Obtains a JSON string representation of the :py:class:`Dataset\n        <mlflow.data.dataset.Dataset>`.\n\n        Returns:\n            A JSON string representation of the :py:class:`Dataset <mlflow.data.dataset.Dataset>`.\n        \"\"\"\n\n        return json.dumps(self.to_dict())\n\n    @property\n    def name(self) -> str:\n        \"\"\"\n        The name of the dataset, e.g. ``\"iris_data\"``, ``\"myschema.mycatalog.mytable@v1\"``, etc.\n        \"\"\"\n        if self._name is not None:\n            return self._name\n        else:\n            return \"dataset\"\n\n    @property\n    def digest(self) -> str:\n        \"\"\"\n        A unique hash or fingerprint of the dataset, e.g. ``\"498c7496\"``.\n        \"\"\"\n        return self._digest\n\n    @property\n    def source(self) -> DatasetSource:\n        \"\"\"\n        Information about the dataset's source, represented as an instance of\n        :py:class:`DatasetSource <mlflow.data.dataset_source.DatasetSource>`. For example, this\n        may be the S3 location or the name of the managed Delta Table from which the dataset\n        was derived.\n        \"\"\"\n        return self._source\n\n    @property\n    @abstractmethod\n    def profile(self) -> Optional[Any]:\n        \"\"\"\n        Optional summary statistics for the dataset, such as the number of rows in a table, the\n        mean / median / std of each table column, etc.\n        \"\"\"\n\n    @property\n    @abstractmethod\n    def schema(self) -> Optional[Any]:\n        \"\"\"\n        Optional dataset schema, such as an instance of :py:class:`mlflow.types.Schema` representing\n        the features and targets of the dataset.\n        \"\"\"\n\n    def _to_mlflow_entity(self) -> DatasetEntity:\n        \"\"\"\n        Returns:\n            A `mlflow.entities.Dataset` instance representing the dataset.\n        \"\"\"\n        dataset_dict = self.to_dict()\n        return DatasetEntity(\n            name=dataset_dict[\"name\"],\n            digest=dataset_dict[\"digest\"],\n            source_type=dataset_dict[\"source_type\"],\n            source=dataset_dict[\"source\"],\n            schema=dataset_dict.get(\"schema\"),\n            profile=dataset_dict.get(\"profile\"),\n        )\n", "path": "mlflow/data/dataset.py"}]}