Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/pgeon/policy_approximator.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,19 +596,15 @@ def save(self, format: str, path: Union[str, List[str]]):
"""
Save the policy approximator

:param format: The format to save in (e.g., 'json', 'pickle')
:param format: The format to save in (e.g., 'csv')
:param path: The path to save to
"""
if not self._is_fit:
raise Exception("Policy approximator cannot be saved before fitting!")

# Implement appropriate save functionality based on the format
if format == "json":
# Implement JSON serialization
pass
elif format == "pickle":
# Implement pickle serialization
pass
if format == "csv":
raise NotImplementedError("CSV format has not been implemented yet")
else:
raise NotImplementedError(f"Format {format} not supported for saving")

Expand Down