Skip to content

Commit db529ef

Browse files
committed
better training weight default
1 parent 786a54b commit db529ef

File tree

10 files changed

+9
-7
lines changed

10 files changed

+9
-7
lines changed

app/sheduler/weight/best_model.pth

-2.54 MB
Binary file not shown.
2.54 MB
Binary file not shown.
2.54 MB
Binary file not shown.
2.54 MB
Binary file not shown.
2.54 MB
Binary file not shown.

train.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,21 @@
1717
print('Running on the CPU')
1818

1919
# work on model ? redo double chanel one conv causal the other as validator
20-
"""
20+
21+
# yfinance daily
2122
# liquid net / graph like llm
2223
tickers= ["DEFI", "PANW", "MRVL", "NKLA", "AFRM", "EBIT.TO", "^FCHI", "NKE", "^GSPC", "^IXIC", "BILL", "EXPE", 'LINK-USD', "TTWO", "NET", 'ICP-USD', 'FET-USD', 'FIL-USD', 'THETA-USD','AVAX-USD', 'HBAR-USD', 'UNI-USD', 'STX-USD', 'OM-USD', 'FTM-USD', "INJ-USD", "INTC", "SQ", "XOM", "COST", "BP", "BAC", "JPM", "GS", "CVX", "BA", "PFE", "PYPL", "SBUX", "DIS", "NFLX", 'GOOG', "NVDA", "JNJ", "META", "GOOGL", "AAPL", "MSFT", "BTC-EUR", "CRO-EUR", "ETH-USD", "CRO-USD", "BTC-USD", "BNB-USD", "XRP-USD", "ADA-USD", "SOL-USD"]
2324
tickers_val = ["AMZN", "AMD", "ETH-EUR", "ELF", "UBER"]
2425
TICKERS_ETF = ["^GSPC", "^FCHI", "^IXIC","EBIT.TO", "BTC-USD"]
25-
"""
26+
2627

2728
# live mode
28-
tickers= [ "CRO-EUR", "ETH-USD", "CRO-USD", "BTC-USD", "XRP-USD", "ADA-USD", "SOL-USD"]
29-
tickers_val = ['LINK-USD', 'ICP-USD', 'FET-USD', 'FIL-USD', "ETH-EUR"]
29+
# only crypto kraken api
30+
#tickers= [ "CRO-EUR", "ETH-USD", "CRO-USD", "BTC-USD", "XRP-USD", "ADA-USD", "SOL-USD", "PEPE-USD", "POPCAT-USD", "DOGE-USD", "TRUMP-USD", "SUI-USD"]
31+
#tickers_val = ['LINK-USD', 'ICP-USD', 'FET-USD', 'FIL-USD', "ETH-EUR"]
3032

3133
# tran data
32-
dataset = StockDataset(ticker=tickers, interval='1')
34+
dataset = StockDataset(ticker=tickers) #, interval='1'
3335
dataloader = DataLoader(dataset, batch_size=256, shuffle=True, num_workers=1)
3436

3537
# val data
@@ -38,7 +40,7 @@
3840

3941
# temp (non distinct loss and balance) seq val on known stock
4042
lenval = len(dataset_val)
41-
indval = int(len(dataset) / 1.3) # Select half the dataset
43+
indval = int(len(dataset) / 1.2) # Select half the dataset
4244

4345
# Ensure index bounds are valid
4446
if indval > 0:
@@ -67,5 +69,5 @@
6769
model = ConvCausalLTSM(input_shape=input_sample.shape)
6870
del input_sample
6971
# LtsmAttentionforecastPred, ConvCausalLTSM
70-
model = train_model(model, dataloader, dataloader_val, epochs=100, learning_rate=0.01, lrfn=CosineWarmup(0.01, 100).lrfn, checkpoint_file=load("weight/standard/ConvCausalLTSM/80_weight.pth"))
72+
model = train_model(model, dataloader, dataloader_val, epochs=100, learning_rate=0.01, lrfn=CosineWarmup(0.01, 100).lrfn, checkpoint_file=load("weight/best_model.pth"))
7173

weight/0_weight.pth

0 Bytes
Binary file not shown.

weight/40_weight.pth

0 Bytes
Binary file not shown.

weight/80_weight.pth

0 Bytes
Binary file not shown.

weight/best_model.pth

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)