Skip to content

Commit 26e0c2c

Browse files
authored
update fip (#112)
* update fip * modify version
1 parent d4ca28a commit 26e0c2c

29 files changed

Lines changed: 4744 additions & 2142 deletions

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "causica"
3-
version = "0.4.3"
3+
version = "0.4.4"
44
description = ""
55
readme = "README.md"
66
authors = ["Microsoft Research - Causica"]
@@ -64,13 +64,15 @@ known_first_party = ["causica"]
6464
treat_comments_as_code = ["# %%"]
6565

6666
[tool.pytest.ini_options]
67+
norecursedirs = "integration"
6768
addopts = "--durations=200"
6869
junit_family = "xunit1"
6970

7071
[tool.mypy]
7172
ignore_missing_imports = true
7273
exclude = [
73-
"research_experiments/avid"
74+
"research_experiments/avid",
75+
"research_experiments/fip",
7476
]
7577

7678
[tool.pylint.main]

research_experiments/fip/poetry.lock

Lines changed: 4185 additions & 1685 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

research_experiments/fip/pyproject.toml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "fip"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
description = "A Fixed-Point Approach for Causal Generative Modeling"
55
readme = "README.md"
66
authors = ["Meyer Scetbon", "Joel Jennings", "Agrin Hilmkil", "Cheng Zhang", "Chao Ma"]
@@ -11,8 +11,34 @@ license = "MIT"
1111

1212
[tool.poetry.dependencies]
1313
python = "~3.10"
14-
causica = "0.4.1"
14+
causica = "0.4.2"
15+
16+
[tool.poetry.group.dev.dependencies]
17+
black = {version="^22.6.0", extras=["jupyter"]}
18+
isort = "^5.10.1"
19+
jupyter = "^1.0.0"
20+
jupytext = "^1.13.8"
21+
mypy = "^1.0.0"
22+
pre-commit = "^2.19.0"
23+
pylint = "^2.14.4"
24+
pytest = "^7.1.2"
25+
pytest-cov = "^3.0.0"
26+
seaborn = "^0.12.2"
27+
types-python-dateutil = "^2.8.18"
28+
types-requests = "^2.31.0.10"
29+
1530

1631
[build-system]
1732
requires = ["poetry-core>=1.0.0"]
1833
build-backend = "poetry.core.masonry.api"
34+
35+
[tool.black]
36+
line-length = 120
37+
38+
[tool.isort]
39+
line_length = 120
40+
profile = "black"
41+
py_version = 310
42+
known_first_party = ["fip"]
43+
# Keep import sorts by code jupytext percent block (https://github.com/PyCQA/isort/issues/1338)
44+
treat_comments_as_code = ["# %%"]

research_experiments/fip/src/fip/config/amortization/leaf_prediction.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
seed_everything: 234
1+
seed_everything: 234
2+
23
model:
34
class_path: fip.tasks.amortization.leaf_prediction.LeafPrediction
45
init_args:
@@ -14,6 +15,7 @@ model:
1415
num_to_keep_training: 10
1516
distributed: false
1617
elimination_type: "self"
18+
1719
trainer:
1820
max_epochs: 2000
1921
accelerator: gpu
@@ -22,16 +24,19 @@ trainer:
2224
profiler: "simple"
2325
devices: 1
2426
accumulate_grad_batches: 1
27+
2528
best_checkpoint_callback:
2629
dirpath: "./outputs/"
2730
filename: "best_model"
2831
save_top_k: 1
2932
mode: "min"
3033
monitor: "val_loss"
3134
every_n_epochs: 1
35+
3236
last_checkpoint_callback:
3337
save_last: true
3438
save_top_k: 0 # only the last checkpoint is saved
39+
3540
early_stopping_callback:
3641
monitor: "val_loss"
3742
min_delta: 0.0001

research_experiments/fip/src/fip/config/scm_learning_with_ground_truth/scm_learning_true_graph.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
seed_everything: 234
2+
23
model:
34
class_path: fip.tasks.scm_learning_with_ground_truth.scm_learning_true_graph.SCMLearningTrueGraph
45
init_args:
@@ -9,13 +10,14 @@ model:
910
num_heads: 8
1011
d_feedforward: 128
1112
total_nodes: 4
12-
total_layers: 2
13+
total_layers: 1
1314
dropout_prob: 0.
1415
mask_type: "none"
1516
attn_type: "causal"
1617
cost_type: "dot_product"
1718
learnable_loss: false
1819
distributed: false
20+
1921
trainer:
2022
max_epochs: 1000
2123
accelerator: gpu
@@ -24,19 +26,22 @@ trainer:
2426
log_every_n_steps: 10
2527
inference_mode: false
2628
profiler: "simple"
29+
2730
early_stopping_callback:
2831
monitor: "val_loss"
2932
min_delta: 0.0001
3033
patience: 500
3134
verbose: False
3235
mode: "min"
36+
3337
best_checkpoint_callback:
3438
dirpath: "./outputs/"
3539
filename: "best_model"
3640
save_top_k: 1
3741
mode: "min"
3842
monitor: "val_loss"
3943
every_n_epochs: 1
44+
4045
last_checkpoint_callback:
4146
save_last: true
4247
save_top_k: 0 # only the last checkpoint is saved

research_experiments/fip/src/fip/config/scm_learning_with_ground_truth/scm_learning_true_perm.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
seed_everything: 5000
2+
23
model:
34
class_path: fip.tasks.scm_learning_with_ground_truth.scm_learning_true_perm.SCMLearningTruePerm
45
init_args:
@@ -16,6 +17,7 @@ model:
1617
cost_type: "dot_product"
1718
learnable_loss: false
1819
distributed: false
20+
1921
trainer:
2022
max_epochs: 1000
2123
accelerator: gpu
@@ -24,19 +26,22 @@ trainer:
2426
log_every_n_steps: 10
2527
inference_mode: false
2628
profiler: "simple"
29+
2730
early_stopping_callback:
2831
monitor: "val_loss"
2932
min_delta: 0.0001
3033
patience: 500
3134
verbose: False
3235
mode: "min"
36+
3337
best_checkpoint_callback:
3438
dirpath: "./outputs/"
3539
filename: "best_model"
3640
save_top_k: 1
3741
mode: "min"
3842
monitor: "val_loss"
3943
every_n_epochs: 1
44+
4045
last_checkpoint_callback:
4146
save_last: true
4247
save_top_k: 0 # only the last checkpoint is saved

research_experiments/fip/src/fip/config/scm_learning_with_predicted_truth/scm_learning_predicted_leaf.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
seed_everything: 5000
1+
seed_everything: 234
2+
23
model:
34
class_path: fip.tasks.scm_learning_with_predicted_truth.scm_learning_predicted_leaf.SCMLearningPredLeaf
45
init_args:
@@ -18,26 +19,30 @@ model:
1819
cost_type: "dot_product"
1920
learnable_loss: false
2021
distributed: false
22+
2123
trainer:
2224
max_epochs: 1000
2325
accelerator: gpu
2426
devices: 1
2527
check_val_every_n_epoch: 1
2628
log_every_n_steps: 10
2729
inference_mode: false
30+
2831
early_stopping_callback:
2932
monitor: "val_loss"
3033
min_delta: 0.0001
3134
patience: 500
3235
verbose: False
3336
mode: "min"
37+
3438
best_checkpoint_callback:
3539
dirpath: "./outputs/"
3640
filename: "best_model"
3741
save_top_k: 1
3842
mode: "min"
3943
monitor: "val_loss"
4044
every_n_epochs: 1
45+
4146
last_checkpoint_callback:
4247
save_last: true
4348
save_top_k: 0 # only the last checkpoint is saved

0 commit comments

Comments
 (0)