diff --git a/laborious/activities/gates.py b/laborious/activities/gates.py index feb746d..1619826 100644 --- a/laborious/activities/gates.py +++ b/laborious/activities/gates.py @@ -409,6 +409,7 @@ class Gates(BaseActivity): self.debug( f"Prediction store policy: {prediction_store_policy}", metadata) + self.debug(f"Prediction data: {data.to_string()}", metadata) policy_type, policy_value = self.get_prediction_store_policy( prediction_store_policy, metadata) @@ -442,7 +443,7 @@ class Gates(BaseActivity): data = data.sort_values(by='timestamp', ascending=False) data = data.reset_index(drop=True) - self.info(f"Prediction formatted: {data.size} rows", metadata) + self.info(f"Prediction formatted: {len(data)} rows", metadata) self.debug(f"Prediction data: {data.to_string()}", metadata) return data.to_dict() diff --git a/tests.ipynb b/tests.ipynb index 4c6fef2..4f9b7f8 100644 --- a/tests.ipynb +++ b/tests.ipynb @@ -332,7 +332,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "id": "e7c8eeb1", "metadata": {}, "outputs": [ @@ -452,6 +452,14 @@ }, "metadata": {}, "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3\n", + "1\n" + ] } ], "source": [ @@ -468,7 +476,13 @@ "\n", "print(\"a\" in a.columns)\n", "\n", - "display(a.tail(1))" + "b = a.tail(1)\n", + "\n", + "display(b)\n", + "\n", + "print(len(a))\n", + "print(len(b))\n", + "print(b.size)\n" ] } ],