From 06e7d703d44f7892a24ba56088aa39f2455285a1 Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Sat, 10 Aug 2024 14:43:11 -0400 Subject: [PATCH] fix: add back in property (needed), but setter is not needed --- src/autora/state.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/autora/state.py b/src/autora/state.py index 6667bb87..99c362f4 100644 --- a/src/autora/state.py +++ b/src/autora/state.py @@ -1533,6 +1533,14 @@ def y(self) -> pd.DataFrame: return pd.DataFrame() return self.experiment_data[self.dv_names] + @property + def model(self): + """Alias for the last model in the `models`.""" + try: + return self.models[-1] + except IndexError: + return None + X = TypeVar("X") Y = TypeVar("Y")