Skip to content

Commit

Permalink
Add get_auto_ablate_params
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbeel committed Jan 22, 2024
1 parent d0abd0c commit fff8f92
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions howso/direct/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5075,6 +5075,13 @@ def set_auto_analyze_params( # noqa: C901
)
self._auto_persist_trainee(trainee_id)

def get_auto_ablate_params(self, trainee_id: str):
"""
Get parameters set by :meth:`set_auto_ablate_params`.
"""
self._auto_resolve_trainee(trainee_id)
self.howso.get_auto_ablate_params(trainee_id)

def set_auto_ablate_params(
self,
trainee_id: str,
Expand Down
8 changes: 8 additions & 0 deletions howso/direct/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,14 @@ def get_num_training_cases(self, trainee_id: str) -> Dict:
A dictionary containing the key "count".
"""
return self._execute("get_num_training_cases", {"trainee": trainee_id})

def get_auto_ablate_params(self, trainee_id: str):
"""
Get parameters set by :meth:`set_auto_ablate_params`.
"""
return self._execute(
"set_auto_ablate_params", {"trainee": trainee_id}
)

def set_auto_ablate_params(
self,
Expand Down
9 changes: 9 additions & 0 deletions howso/engine/trainee.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,15 @@ def auto_analyze(self) -> None:
else:
raise ValueError("Client must have the 'auto_analyze' method.")

def get_auto_ablate_params(self):
"""
Get parameters set by :meth:`set_auto_ablate_params`.
"""
if isinstance(self.client, AbstractHowsoClient):
self.client.get_auto_ablate_params()
else:
raise ValueError("Client must have the 'get_auto_ablate_params' method.")

def set_auto_ablate_params(
self,
auto_ablate_enabled: bool = False,
Expand Down

0 comments on commit fff8f92

Please sign in to comment.