Merge branch 'develop' into pr/initrv/8426

This commit is contained in:
Matthias
2023-04-16 18:16:16 +02:00
25 changed files with 948 additions and 416 deletions
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -886,7 +886,7 @@ class Exchange:
'filled': _amount,
'remaining': 0.0,
'status': "closed",
'cost': (dry_order['amount'] * average) / leverage
'cost': (dry_order['amount'] * average)
})
# market orders will always incurr taker fees
dry_order = self.add_dry_order_fee(pair, dry_order, 'taker')
@@ -45,5 +45,6 @@ class BasePyTorchRegressor(BasePyTorchModel):
device=self.device
)
y = self.model.model(x)
y = y.cpu()
pred_df = DataFrame(y.detach().numpy(), columns=[dk.label_list[0]])
return (pred_df, dk.do_predict)
@@ -143,8 +143,8 @@ class PyTorchModelTrainer(PyTorchTrainerInterface):
"""
data_loader_dictionary = {}
for split in splits:
x = self.data_convertor.convert_x(data_dictionary[f"{split}_features"])
y = self.data_convertor.convert_y(data_dictionary[f"{split}_labels"])
x = self.data_convertor.convert_x(data_dictionary[f"{split}_features"], self.device)
y = self.data_convertor.convert_y(data_dictionary[f"{split}_labels"], self.device)
dataset = TensorDataset(*x, *y)
data_loader = DataLoader(
dataset,
+1 -4
View File
@@ -66,10 +66,7 @@ def authorized_only(command_handler: Callable[..., None]) -> Callable[..., Any]:
chat_id = int(self._config['telegram']['chat_id'])
if cchat_id != chat_id:
logger.info(
'Rejected unauthorized message from: %s',
update.message.chat_id
)
logger.info(f'Rejected unauthorized message from: {update.message.chat_id}')
return wrapper
# Rollback session to avoid getting data stored in a transaction.
Trade.rollback()