Skip to content

Commit

Permalink
refactor: seperate train & sweep configs #9
Browse files Browse the repository at this point in the history
  • Loading branch information
twndus committed May 16, 2024
1 parent 9045b2f commit 771c0ca
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 289 deletions.
98 changes: 0 additions & 98 deletions _train.py

This file was deleted.

47 changes: 0 additions & 47 deletions configs/_train_config.yaml

This file was deleted.

33 changes: 1 addition & 32 deletions configs/sweep_config.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,5 @@
# run config
seed: 42
shuffle: True
model_dir: outputs/models
submit_dir: outputs/submissions
data_dir: data/
log_dir: logs/

# wandb config
wandb: True # True/ False
project: YelpRecommendation
notes: "..."
tags: [test, yelp, cdae]

# train config
device: cuda # cpu
epochs: 1
batch_size: 32
lr: 0.001
optimizer: adamw
loss: bce
patience: 5
top_n: 10

# model config
model_name: CDAE
hidden_size: 64
corruption_level: 0.6
hidden_activation: sigmoid
output_activation: sigmoid


# sweep config
## MF
sweep_count: 3
method: random
name: sweep
Expand Down
23 changes: 12 additions & 11 deletions configs/train_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ model_dir: outputs/models
submit_dir: outputs/submissions
data_dir: data/
log_dir: logs/
sweep: True

# wandb config
wandb: True # True/ False
Expand All @@ -17,20 +18,20 @@ device: cuda # cpu
epochs: 10
batch_size: 32
lr: 0.001
optimizer: sgd # adamw
loss_name: bpr # pointwise # bce
optimizer: adam # adamw
loss_name: bce # bpr # pointwise # bce
patience: 5
top_n: 10
weight_decay: 0 #1e-5

# model config
#model_name: CDAE
#negative_sampling: True # False
#neg_times: 5 # this works only when negative_sampling == True, if value is 5, the number of negative samples will be 5 times the number of positive samples by users
#hidden_size: 64
#corruption_level: 0.6
#hidden_activation: sigmoid
#output_activation: sigmoid
model_name: CDAE
negative_sampling: True # False
neg_times: 5 # this works only when negative_sampling == True, if value is 5, the number of negative samples will be 5 times the number of positive samples by users
hidden_size: 64
corruption_level: 0.6
hidden_activation: sigmoid
output_activation: sigmoid

model_name: MF
embed_size: 64
#model_name: MF
#embed_size: 64
13 changes: 12 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ hydra-core = "^1.3.2"
loguru = "^0.7.2"
wandb = "^0.17.0"
scikit-learn = "1.4.0"
easydict = "^1.13"

[tool.poetry.group.dev.dependencies]
ipykernel = "^6.29.4"
Expand Down
73 changes: 0 additions & 73 deletions sweep.py

This file was deleted.

Loading

0 comments on commit 771c0ca

Please sign in to comment.