We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
AttributeError: 'dict' object has no attribute 'append' in job.to_chunked_dataframe()
## Expected Behavior 
Return a generator of a chunked dataframe
## Current Behavior
Giving error :
```
/home/dev/feast-venv/lib/python3.7/site-packages/feast/job.py in to_chunked_dataframe(self, max_chunk_size, timeout_sec)
    187         records = []
    188         for result in self.result(timeout_sec=timeout_sec):
--> 189             result.append(records)
    190             if len(records) == max_chunk_size:
    191                 df = pd.DataFrame.from_records(records)
AttributeError: 'dict' object has no attribute 'append'
```
## Steps to reproduce
```
test = job.to_chunked_dataframe(10)
next(test)
```
### Specifications

- Version: 0.5.0
- Platform: Python 3.7
- Subsystem: 

## Possible Solution
In line 189, it should be  `records.append(result)` instead of `result.append(records)`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `sdk/python/feast/job.py`
Content:
```
1 from typing import List
2 from urllib.parse import urlparse
3 
4 import fastavro
5 import grpc
6 import pandas as pd
7 
8 from feast.constants import CONFIG_TIMEOUT_KEY
9 from feast.constants import FEAST_DEFAULT_OPTIONS as defaults
10 from feast.serving.ServingService_pb2 import (
11     DATA_FORMAT_AVRO,
12     JOB_STATUS_DONE,
13     GetJobRequest,
14 )
15 from feast.serving.ServingService_pb2 import Job as JobProto
16 from feast.serving.ServingService_pb2_grpc import ServingServiceStub
17 from feast.staging.storage_client import get_staging_client
18 from feast.wait import wait_retry_backoff
19 from tensorflow_metadata.proto.v0 import statistics_pb2
20 
21 # Maximum no of seconds to wait until the retrieval jobs status is DONE in Feast
22 # Currently set to the maximum query execution time limit in BigQuery
23 DEFAULT_TIMEOUT_SEC: int = 21600
24 
25 # Maximum no of seconds to wait before reloading the job status in Feast
26 MAX_WAIT_INTERVAL_SEC: int = 60
27 
28 
29 class RetrievalJob:
30     """
31     A class representing a job for feature retrieval in Feast.
32     """
33 
34     def __init__(
35         self,
36         job_proto: JobProto,
37         serving_stub: ServingServiceStub,
38         auth_metadata_plugin: grpc.AuthMetadataPlugin = None,
39     ):
40         """
41         Args:
42             job_proto: Job proto object (wrapped by this job object)
43             serving_stub: Stub for Feast serving service
44             auth_metadata_plugin: plugin to fetch auth metadata
45         """
46         self.job_proto = job_proto
47         self.serving_stub = serving_stub
48         self.auth_metadata = auth_metadata_plugin
49 
50     @property
51     def id(self):
52         """
53         Getter for the Job Id
54         """
55         return self.job_proto.id
56 
57     @property
58     def status(self):
59         """
60         Getter for the Job status from Feast Core
61         """
62         return self.job_proto.status
63 
64     def reload(self):
65         """
66         Reload the latest job status
67         Returns: None
68         """
69         self.job_proto = self.serving_stub.GetJob(
70             GetJobRequest(job=self.job_proto),
71             metadata=self.auth_metadata.get_signed_meta() if self.auth_metadata else (),
72         ).job
73 
74     def get_avro_files(self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])):
75         """
76         Wait until job is done to get the file uri to Avro result files on
77         Google Cloud Storage.
78 
79         Args:
80             timeout_sec (int):
81                 Max no of seconds to wait until job is done. If "timeout_sec"
82                 is exceeded, an exception will be raised.
83 
84         Returns:
85             str: Google Cloud Storage file uris of the returned Avro files.
86         """
87 
88         def try_retrieve():
89             self.reload()
90             return None, self.status == JOB_STATUS_DONE
91 
92         wait_retry_backoff(
93             retry_fn=try_retrieve,
94             timeout_secs=timeout_sec,
95             timeout_msg="Timeout exceeded while waiting for result. Please retry "
96             "this method or use a longer timeout value.",
97         )
98 
99         if self.job_proto.error:
100             raise Exception(self.job_proto.error)
101 
102         if self.job_proto.data_format != DATA_FORMAT_AVRO:
103             raise Exception(
104                 "Feast only supports Avro data format for now. Please check "
105                 "your Feast Serving deployment."
106             )
107 
108         return [urlparse(uri) for uri in self.job_proto.file_uris]
109 
110     def result(self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])):
111         """
112         Wait until job is done to get an iterable rows of result. The row can
113         only represent an Avro row in Feast 0.3.
114 
115         Args:
116             timeout_sec (int):
117                 Max no of seconds to wait until job is done. If "timeout_sec"
118                 is exceeded, an exception will be raised.
119 
120         Returns:
121             Iterable of Avro rows.
122         """
123         uris = self.get_avro_files(timeout_sec)
124         for file_uri in uris:
125             file_obj = get_staging_client(file_uri.scheme).download_file(file_uri)
126             file_obj.seek(0)
127             avro_reader = fastavro.reader(file_obj)
128 
129             for record in avro_reader:
130                 yield record
131 
132     def to_dataframe(
133         self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])
134     ) -> pd.DataFrame:
135         """
136         Wait until a job is done to get an iterable rows of result. This method
137         will split the response into chunked DataFrame of a specified size to
138         to be yielded to the instance calling it.
139 
140         Args:
141             max_chunk_size (int):
142                 Maximum number of rows that the DataFrame should contain.
143 
144             timeout_sec (int):
145                 Max no of seconds to wait until job is done. If "timeout_sec"
146                 is exceeded, an exception will be raised.
147 
148         Returns:
149             pd.DataFrame:
150                 Pandas DataFrame of the feature values.
151         """
152         records = [r for r in self.result(timeout_sec=timeout_sec)]
153         return pd.DataFrame.from_records(records)
154 
155     def to_chunked_dataframe(
156         self,
157         max_chunk_size: int = -1,
158         timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY]),
159     ) -> pd.DataFrame:
160         """
161         Wait until a job is done to get an iterable rows of result. This method
162         will split the response into chunked DataFrame of a specified size to
163         to be yielded to the instance calling it.
164 
165         Args:
166             max_chunk_size (int):
167                 Maximum number of rows that the DataFrame should contain.
168 
169             timeout_sec (int):
170                 Max no of seconds to wait until job is done. If "timeout_sec"
171                 is exceeded, an exception will be raised.
172 
173         Returns:
174             pd.DataFrame:
175                 Pandas DataFrame of the feature values.
176         """
177 
178         # Object is Avro row type object, refer to self.result function for this type
179         records: List[dict] = []
180 
181         # Max chunk size defined by user
182         for result in self.result(timeout_sec=timeout_sec):
183             result.append(records)
184             if len(records) == max_chunk_size:
185                 df = pd.DataFrame.from_records(records)
186                 records.clear()  # Empty records array
187                 yield df
188 
189         # Handle for last chunk that is < max_chunk_size
190         if not records:
191             yield pd.DataFrame.from_records(records)
192 
193     def __iter__(self):
194         return iter(self.result())
195 
196     def statistics(
197         self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])
198     ) -> statistics_pb2.DatasetFeatureStatisticsList:
199         """
200         Get statistics computed over the retrieved data set. Statistics will only be computed for
201         columns that are part of Feast, and not the columns that were provided.
202 
203         Args:
204             timeout_sec (int):
205                 Max no of seconds to wait until job is done. If "timeout_sec"
206                 is exceeded, an exception will be raised.
207 
208         Returns:
209             DatasetFeatureStatisticsList containing statistics of Feast features over the retrieved dataset.
210         """
211         self.get_avro_files(timeout_sec)  # wait for job completion
212         if self.job_proto.error:
213             raise Exception(self.job_proto.error)
214         return self.job_proto.dataset_feature_statistics_list
215
```
--- 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/sdk/python/feast/job.py b/sdk/python/feast/job.py
--- a/sdk/python/feast/job.py
+++ b/sdk/python/feast/job.py
@@ -134,13 +134,9 @@
     ) -> pd.DataFrame:
         """
         Wait until a job is done to get an iterable rows of result. This method
-        will split the response into chunked DataFrame of a specified size to
-        to be yielded to the instance calling it.
+        will return the response as a DataFrame.
 
         Args:
-            max_chunk_size (int):
-                Maximum number of rows that the DataFrame should contain.
-
             timeout_sec (int):
                 Max no of seconds to wait until job is done. If "timeout_sec"
                 is exceeded, an exception will be raised.
@@ -180,14 +176,14 @@
 
         # Max chunk size defined by user
         for result in self.result(timeout_sec=timeout_sec):
-            result.append(records)
+            records.append(result)
             if len(records) == max_chunk_size:
                 df = pd.DataFrame.from_records(records)
                 records.clear()  # Empty records array
                 yield df
 
         # Handle for last chunk that is < max_chunk_size
-        if not records:
+        if records:
             yield pd.DataFrame.from_records(records)
 
     def __iter__(self):

{"golden_diff": "diff --git a/sdk/python/feast/job.py b/sdk/python/feast/job.py\n--- a/sdk/python/feast/job.py\n+++ b/sdk/python/feast/job.py\n@@ -134,13 +134,9 @@\n     ) -> pd.DataFrame:\n         \"\"\"\n         Wait until a job is done to get an iterable rows of result. This method\n-        will split the response into chunked DataFrame of a specified size to\n-        to be yielded to the instance calling it.\n+        will return the response as a DataFrame.\n \n         Args:\n-            max_chunk_size (int):\n-                Maximum number of rows that the DataFrame should contain.\n-\n             timeout_sec (int):\n                 Max no of seconds to wait until job is done. If \"timeout_sec\"\n                 is exceeded, an exception will be raised.\n@@ -180,14 +176,14 @@\n \n         # Max chunk size defined by user\n         for result in self.result(timeout_sec=timeout_sec):\n-            result.append(records)\n+            records.append(result)\n             if len(records) == max_chunk_size:\n                 df = pd.DataFrame.from_records(records)\n                 records.clear()  # Empty records array\n                 yield df\n \n         # Handle for last chunk that is < max_chunk_size\n-        if not records:\n+        if records:\n             yield pd.DataFrame.from_records(records)\n \n     def __iter__(self):\n", "issue": "AttributeError: 'dict' object has no attribute 'append' in job.to_chunked_dataframe()\n## Expected Behavior \r\nReturn a generator of a chunked dataframe\r\n## Current Behavior\r\nGiving error :\r\n```\r\n/home/dev/feast-venv/lib/python3.7/site-packages/feast/job.py in to_chunked_dataframe(self, max_chunk_size, timeout_sec)\r\n    187         records = []\r\n    188         for result in self.result(timeout_sec=timeout_sec):\r\n--> 189             result.append(records)\r\n    190             if len(records) == max_chunk_size:\r\n    191                 df = pd.DataFrame.from_records(records)\r\nAttributeError: 'dict' object has no attribute 'append'\r\n```\r\n## Steps to reproduce\r\n```\r\ntest = job.to_chunked_dataframe(10)\r\nnext(test)\r\n```\r\n### Specifications\r\n\r\n- Version: 0.5.0\r\n- Platform: Python 3.7\r\n- Subsystem: \r\n\r\n## Possible Solution\r\nIn line 189, it should be  `records.append(result)` instead of `result.append(records)`\n", "before_files": [{"content": "from typing import List\nfrom urllib.parse import urlparse\n\nimport fastavro\nimport grpc\nimport pandas as pd\n\nfrom feast.constants import CONFIG_TIMEOUT_KEY\nfrom feast.constants import FEAST_DEFAULT_OPTIONS as defaults\nfrom feast.serving.ServingService_pb2 import (\n    DATA_FORMAT_AVRO,\n    JOB_STATUS_DONE,\n    GetJobRequest,\n)\nfrom feast.serving.ServingService_pb2 import Job as JobProto\nfrom feast.serving.ServingService_pb2_grpc import ServingServiceStub\nfrom feast.staging.storage_client import get_staging_client\nfrom feast.wait import wait_retry_backoff\nfrom tensorflow_metadata.proto.v0 import statistics_pb2\n\n# Maximum no of seconds to wait until the retrieval jobs status is DONE in Feast\n# Currently set to the maximum query execution time limit in BigQuery\nDEFAULT_TIMEOUT_SEC: int = 21600\n\n# Maximum no of seconds to wait before reloading the job status in Feast\nMAX_WAIT_INTERVAL_SEC: int = 60\n\n\nclass RetrievalJob:\n    \"\"\"\n    A class representing a job for feature retrieval in Feast.\n    \"\"\"\n\n    def __init__(\n        self,\n        job_proto: JobProto,\n        serving_stub: ServingServiceStub,\n        auth_metadata_plugin: grpc.AuthMetadataPlugin = None,\n    ):\n        \"\"\"\n        Args:\n            job_proto: Job proto object (wrapped by this job object)\n            serving_stub: Stub for Feast serving service\n            auth_metadata_plugin: plugin to fetch auth metadata\n        \"\"\"\n        self.job_proto = job_proto\n        self.serving_stub = serving_stub\n        self.auth_metadata = auth_metadata_plugin\n\n    @property\n    def id(self):\n        \"\"\"\n        Getter for the Job Id\n        \"\"\"\n        return self.job_proto.id\n\n    @property\n    def status(self):\n        \"\"\"\n        Getter for the Job status from Feast Core\n        \"\"\"\n        return self.job_proto.status\n\n    def reload(self):\n        \"\"\"\n        Reload the latest job status\n        Returns: None\n        \"\"\"\n        self.job_proto = self.serving_stub.GetJob(\n            GetJobRequest(job=self.job_proto),\n            metadata=self.auth_metadata.get_signed_meta() if self.auth_metadata else (),\n        ).job\n\n    def get_avro_files(self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])):\n        \"\"\"\n        Wait until job is done to get the file uri to Avro result files on\n        Google Cloud Storage.\n\n        Args:\n            timeout_sec (int):\n                Max no of seconds to wait until job is done. If \"timeout_sec\"\n                is exceeded, an exception will be raised.\n\n        Returns:\n            str: Google Cloud Storage file uris of the returned Avro files.\n        \"\"\"\n\n        def try_retrieve():\n            self.reload()\n            return None, self.status == JOB_STATUS_DONE\n\n        wait_retry_backoff(\n            retry_fn=try_retrieve,\n            timeout_secs=timeout_sec,\n            timeout_msg=\"Timeout exceeded while waiting for result. Please retry \"\n            \"this method or use a longer timeout value.\",\n        )\n\n        if self.job_proto.error:\n            raise Exception(self.job_proto.error)\n\n        if self.job_proto.data_format != DATA_FORMAT_AVRO:\n            raise Exception(\n                \"Feast only supports Avro data format for now. Please check \"\n                \"your Feast Serving deployment.\"\n            )\n\n        return [urlparse(uri) for uri in self.job_proto.file_uris]\n\n    def result(self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])):\n        \"\"\"\n        Wait until job is done to get an iterable rows of result. The row can\n        only represent an Avro row in Feast 0.3.\n\n        Args:\n            timeout_sec (int):\n                Max no of seconds to wait until job is done. If \"timeout_sec\"\n                is exceeded, an exception will be raised.\n\n        Returns:\n            Iterable of Avro rows.\n        \"\"\"\n        uris = self.get_avro_files(timeout_sec)\n        for file_uri in uris:\n            file_obj = get_staging_client(file_uri.scheme).download_file(file_uri)\n            file_obj.seek(0)\n            avro_reader = fastavro.reader(file_obj)\n\n            for record in avro_reader:\n                yield record\n\n    def to_dataframe(\n        self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])\n    ) -> pd.DataFrame:\n        \"\"\"\n        Wait until a job is done to get an iterable rows of result. This method\n        will split the response into chunked DataFrame of a specified size to\n        to be yielded to the instance calling it.\n\n        Args:\n            max_chunk_size (int):\n                Maximum number of rows that the DataFrame should contain.\n\n            timeout_sec (int):\n                Max no of seconds to wait until job is done. If \"timeout_sec\"\n                is exceeded, an exception will be raised.\n\n        Returns:\n            pd.DataFrame:\n                Pandas DataFrame of the feature values.\n        \"\"\"\n        records = [r for r in self.result(timeout_sec=timeout_sec)]\n        return pd.DataFrame.from_records(records)\n\n    def to_chunked_dataframe(\n        self,\n        max_chunk_size: int = -1,\n        timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY]),\n    ) -> pd.DataFrame:\n        \"\"\"\n        Wait until a job is done to get an iterable rows of result. This method\n        will split the response into chunked DataFrame of a specified size to\n        to be yielded to the instance calling it.\n\n        Args:\n            max_chunk_size (int):\n                Maximum number of rows that the DataFrame should contain.\n\n            timeout_sec (int):\n                Max no of seconds to wait until job is done. If \"timeout_sec\"\n                is exceeded, an exception will be raised.\n\n        Returns:\n            pd.DataFrame:\n                Pandas DataFrame of the feature values.\n        \"\"\"\n\n        # Object is Avro row type object, refer to self.result function for this type\n        records: List[dict] = []\n\n        # Max chunk size defined by user\n        for result in self.result(timeout_sec=timeout_sec):\n            result.append(records)\n            if len(records) == max_chunk_size:\n                df = pd.DataFrame.from_records(records)\n                records.clear()  # Empty records array\n                yield df\n\n        # Handle for last chunk that is < max_chunk_size\n        if not records:\n            yield pd.DataFrame.from_records(records)\n\n    def __iter__(self):\n        return iter(self.result())\n\n    def statistics(\n        self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])\n    ) -> statistics_pb2.DatasetFeatureStatisticsList:\n        \"\"\"\n        Get statistics computed over the retrieved data set. Statistics will only be computed for\n        columns that are part of Feast, and not the columns that were provided.\n\n        Args:\n            timeout_sec (int):\n                Max no of seconds to wait until job is done. If \"timeout_sec\"\n                is exceeded, an exception will be raised.\n\n        Returns:\n            DatasetFeatureStatisticsList containing statistics of Feast features over the retrieved dataset.\n        \"\"\"\n        self.get_avro_files(timeout_sec)  # wait for job completion\n        if self.job_proto.error:\n            raise Exception(self.job_proto.error)\n        return self.job_proto.dataset_feature_statistics_list\n", "path": "sdk/python/feast/job.py"}], "after_files": [{"content": "from typing import List\nfrom urllib.parse import urlparse\n\nimport fastavro\nimport grpc\nimport pandas as pd\n\nfrom feast.constants import CONFIG_TIMEOUT_KEY\nfrom feast.constants import FEAST_DEFAULT_OPTIONS as defaults\nfrom feast.serving.ServingService_pb2 import (\n    DATA_FORMAT_AVRO,\n    JOB_STATUS_DONE,\n    GetJobRequest,\n)\nfrom feast.serving.ServingService_pb2 import Job as JobProto\nfrom feast.serving.ServingService_pb2_grpc import ServingServiceStub\nfrom feast.staging.storage_client import get_staging_client\nfrom feast.wait import wait_retry_backoff\nfrom tensorflow_metadata.proto.v0 import statistics_pb2\n\n# Maximum no of seconds to wait until the retrieval jobs status is DONE in Feast\n# Currently set to the maximum query execution time limit in BigQuery\nDEFAULT_TIMEOUT_SEC: int = 21600\n\n# Maximum no of seconds to wait before reloading the job status in Feast\nMAX_WAIT_INTERVAL_SEC: int = 60\n\n\nclass RetrievalJob:\n    \"\"\"\n    A class representing a job for feature retrieval in Feast.\n    \"\"\"\n\n    def __init__(\n        self,\n        job_proto: JobProto,\n        serving_stub: ServingServiceStub,\n        auth_metadata_plugin: grpc.AuthMetadataPlugin = None,\n    ):\n        \"\"\"\n        Args:\n            job_proto: Job proto object (wrapped by this job object)\n            serving_stub: Stub for Feast serving service\n            auth_metadata_plugin: plugin to fetch auth metadata\n        \"\"\"\n        self.job_proto = job_proto\n        self.serving_stub = serving_stub\n        self.auth_metadata = auth_metadata_plugin\n\n    @property\n    def id(self):\n        \"\"\"\n        Getter for the Job Id\n        \"\"\"\n        return self.job_proto.id\n\n    @property\n    def status(self):\n        \"\"\"\n        Getter for the Job status from Feast Core\n        \"\"\"\n        return self.job_proto.status\n\n    def reload(self):\n        \"\"\"\n        Reload the latest job status\n        Returns: None\n        \"\"\"\n        self.job_proto = self.serving_stub.GetJob(\n            GetJobRequest(job=self.job_proto),\n            metadata=self.auth_metadata.get_signed_meta() if self.auth_metadata else (),\n        ).job\n\n    def get_avro_files(self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])):\n        \"\"\"\n        Wait until job is done to get the file uri to Avro result files on\n        Google Cloud Storage.\n\n        Args:\n            timeout_sec (int):\n                Max no of seconds to wait until job is done. If \"timeout_sec\"\n                is exceeded, an exception will be raised.\n\n        Returns:\n            str: Google Cloud Storage file uris of the returned Avro files.\n        \"\"\"\n\n        def try_retrieve():\n            self.reload()\n            return None, self.status == JOB_STATUS_DONE\n\n        wait_retry_backoff(\n            retry_fn=try_retrieve,\n            timeout_secs=timeout_sec,\n            timeout_msg=\"Timeout exceeded while waiting for result. Please retry \"\n            \"this method or use a longer timeout value.\",\n        )\n\n        if self.job_proto.error:\n            raise Exception(self.job_proto.error)\n\n        if self.job_proto.data_format != DATA_FORMAT_AVRO:\n            raise Exception(\n                \"Feast only supports Avro data format for now. Please check \"\n                \"your Feast Serving deployment.\"\n            )\n\n        return [urlparse(uri) for uri in self.job_proto.file_uris]\n\n    def result(self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])):\n        \"\"\"\n        Wait until job is done to get an iterable rows of result. The row can\n        only represent an Avro row in Feast 0.3.\n\n        Args:\n            timeout_sec (int):\n                Max no of seconds to wait until job is done. If \"timeout_sec\"\n                is exceeded, an exception will be raised.\n\n        Returns:\n            Iterable of Avro rows.\n        \"\"\"\n        uris = self.get_avro_files(timeout_sec)\n        for file_uri in uris:\n            file_obj = get_staging_client(file_uri.scheme).download_file(file_uri)\n            file_obj.seek(0)\n            avro_reader = fastavro.reader(file_obj)\n\n            for record in avro_reader:\n                yield record\n\n    def to_dataframe(\n        self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])\n    ) -> pd.DataFrame:\n        \"\"\"\n        Wait until a job is done to get an iterable rows of result. This method\n        will return the response as a DataFrame.\n\n        Args:\n            timeout_sec (int):\n                Max no of seconds to wait until job is done. If \"timeout_sec\"\n                is exceeded, an exception will be raised.\n\n        Returns:\n            pd.DataFrame:\n                Pandas DataFrame of the feature values.\n        \"\"\"\n        records = [r for r in self.result(timeout_sec=timeout_sec)]\n        return pd.DataFrame.from_records(records)\n\n    def to_chunked_dataframe(\n        self,\n        max_chunk_size: int = -1,\n        timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY]),\n    ) -> pd.DataFrame:\n        \"\"\"\n        Wait until a job is done to get an iterable rows of result. This method\n        will split the response into chunked DataFrame of a specified size to\n        to be yielded to the instance calling it.\n\n        Args:\n            max_chunk_size (int):\n                Maximum number of rows that the DataFrame should contain.\n\n            timeout_sec (int):\n                Max no of seconds to wait until job is done. If \"timeout_sec\"\n                is exceeded, an exception will be raised.\n\n        Returns:\n            pd.DataFrame:\n                Pandas DataFrame of the feature values.\n        \"\"\"\n\n        # Object is Avro row type object, refer to self.result function for this type\n        records: List[dict] = []\n\n        # Max chunk size defined by user\n        for result in self.result(timeout_sec=timeout_sec):\n            records.append(result)\n            if len(records) == max_chunk_size:\n                df = pd.DataFrame.from_records(records)\n                records.clear()  # Empty records array\n                yield df\n\n        # Handle for last chunk that is < max_chunk_size\n        if records:\n            yield pd.DataFrame.from_records(records)\n\n    def __iter__(self):\n        return iter(self.result())\n\n    def statistics(\n        self, timeout_sec: int = int(defaults[CONFIG_TIMEOUT_KEY])\n    ) -> statistics_pb2.DatasetFeatureStatisticsList:\n        \"\"\"\n        Get statistics computed over the retrieved data set. Statistics will only be computed for\n        columns that are part of Feast, and not the columns that were provided.\n\n        Args:\n            timeout_sec (int):\n                Max no of seconds to wait until job is done. If \"timeout_sec\"\n                is exceeded, an exception will be raised.\n\n        Returns:\n            DatasetFeatureStatisticsList containing statistics of Feast features over the retrieved dataset.\n        \"\"\"\n        self.get_avro_files(timeout_sec)  # wait for job completion\n        if self.job_proto.error:\n            raise Exception(self.job_proto.error)\n        return self.job_proto.dataset_feature_statistics_list\n", "path": "sdk/python/feast/job.py"}]}