Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions aepsych/database/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# LICENSE file in the root directory of this source tree.

import datetime
import io
import json
import logging
import os
Expand Down Expand Up @@ -440,12 +441,14 @@ def record_outcome(
self._session.add(outcome_entry)
self._session.commit()

def record_strat(self, master_table: tables.DBMasterTable, strat: Strategy) -> None:
def record_strat(
self, master_table: tables.DBMasterTable, strat: io.BytesIO
) -> None:
"""Record a strategy in the database.

Args:
master_table (tables.DBMasterTable): The master table.
strat (Strategy): The strategy.
strat (BytesIO): The strategy in buffer form.
"""
strat_entry = tables.DbStratTable()
strat_entry.strat = strat
Expand Down
Loading