Skip to content

Commit d77cbad

Browse files
committed
Removing get_sample_df to remove pandas, considered a too heavy addition.
1 parent 8f1e93a commit d77cbad

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

dataikuapi/dss/modelevaluationstore.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import json
2-
from io import BytesIO
3-
4-
import pandas as pd
52

63
from dataikuapi.dss.metrics import ComputedMetrics
74
from .discussion import DSSObjectDiscussions
@@ -297,26 +294,6 @@ def get_metrics(self):
297294
return self.client._perform_json(
298295
"GET", "/projects/%s/modelevaluationstores/%s/runs/%s/metrics" % (self.project_key, self.mes_id, self.run_id))
299296

300-
def get_sample_df(self):
301-
"""
302-
Get the sample of the evaluation dataset on which the evaluation was performed
303-
304-
:return:
305-
the sample content, as a :class:`pandas.DataFrame`
306-
"""
307-
buf = BytesIO()
308-
with self.client._perform_raw(
309-
"GET",
310-
"/projects/%s/modelevaluationstores/%s/runs/%s/sample" % (self.project_key, self.mes_id, self.run_id)
311-
).raw as f:
312-
buf.write(f.read())
313-
schema_txt = self.client._perform_raw(
314-
"GET",
315-
"/projects/%s/modelevaluationstores/%s/runs/%s/schema" % (self.project_key, self.mes_id, self.run_id)
316-
).text
317-
schema = json.loads(schema_txt)
318-
return pd.read_csv(BytesIO(buf.getvalue()), compression='gzip', sep='\t', header=None, names=[c["name"] for c in schema["columns"]])
319-
320297

321298
class DSSModelEvaluationFullInfo:
322299
"""

0 commit comments

Comments
 (0)