Skip to content

Commit

Permalink
added config to data_collector
Browse files Browse the repository at this point in the history
  • Loading branch information
SongminYu committed Jan 22, 2024
1 parent 5cc656e commit 5ac95f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Melodie/data_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from MelodieInfra import (
DBConn,
Config,
MelodieExceptions,
is_pypy,
Table,
Expand Down Expand Up @@ -72,6 +73,7 @@ def __init__(self, target="sqlite"):
MelodieExceptions.Data.InvalidDatabaseType(target, {"sqlite"})

self.target = target
self.config: Optional[Config] = None
self.model: Optional[Model] = None
self.scenario: Optional["Scenario"] = None
self._agent_properties_to_collect: Dict[str,
Expand Down
1 change: 1 addition & 0 deletions Melodie/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def create_data_collector(self, data_collector_cls: Type["DataCollector"]):
data_collector = data_collector_cls()
data_collector.model = self
data_collector.scenario = self.scenario
data_collector.config = self.config
self.initialization_queue.append(data_collector)
return data_collector

Expand Down

0 comments on commit 5ac95f4

Please sign in to comment.