Commit 8a405fdd authored by Dr.李's avatar Dr.李

don't include time zone information

parent aff06952
...@@ -1663,11 +1663,11 @@ class Models(Base): ...@@ -1663,11 +1663,11 @@ class Models(Base):
) )
trade_date = Column(DateTime, primary_key=True, nullable=False) trade_date = Column(DateTime, primary_key=True, nullable=False)
model_desc = Column(JSON, nullable=False)
portfolio_name = Column(String(30), primary_key=True, nullable=False) portfolio_name = Column(String(30), primary_key=True, nullable=False)
model_type = Column(String(30), primary_key=True, nullable=False) model_type = Column(String(30), primary_key=True, nullable=False)
version = Column(BigInteger, primary_key=True, nullable=False) version = Column(BigInteger, primary_key=True, nullable=False)
update_time = Column(DateTime, nullable=False) update_time = Column(DateTime, nullable=False)
model_desc = Column(JSON, nullable=False)
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -57,7 +57,7 @@ class LinearRegression(ModelBase): ...@@ -57,7 +57,7 @@ class LinearRegression(ModelBase):
def fit(self, x: np.ndarray, y: np.ndarray): def fit(self, x: np.ndarray, y: np.ndarray):
self.impl.fit(x, y) self.impl.fit(x, y)
self.trained_time = arrow.now().format() self.trained_time = arrow.now().format("YYYY-MM-DD HH:mm:ss")
def predict(self, x: np.ndarray) -> np.ndarray: def predict(self, x: np.ndarray) -> np.ndarray:
return self.impl.predict(x) return self.impl.predict(x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment