From 7ec24791ab8972ba8398bbc1fe2c734106a76946 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Thu, 29 Aug 2024 12:37:50 -0700 Subject: [PATCH 01/85] Your commit message --- .github/workflows/test.yaml | 37 ++++++++++++++++++++++++++++++++ causalbench-asu/tests/execute.py | 19 ++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/test.yaml create mode 100644 causalbench-asu/tests/execute.py diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..067b132b --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,37 @@ +name: CI/CD Test + + +# Controls when the workflow will run +on: + push: + branches: + - main + # Triggers the workflow on push or pull request events but only for the develop branch + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +jobs: + build: + runs-on: self-hosted + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' # Specify your Python version here + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt # Install any other dependencies + pip install torch + + - name: Build the library + run: | + pip install . + + - name: Run Python file + run: | + cd tests + python execute.py # Replace with the path to your Python file \ No newline at end of file diff --git a/causalbench-asu/tests/execute.py b/causalbench-asu/tests/execute.py new file mode 100644 index 00000000..16419c70 --- /dev/null +++ b/causalbench-asu/tests/execute.py @@ -0,0 +1,19 @@ +from causalbench.modules import Run +from causalbench.modules.context import Context + +def main(): + + # Select and fetch the Context + context1: Context = Context(module_id=1, version=1) + + # Run selected Context + run: Run = context1.execute() + + # Print Run execution results + print(run) + + # Publish the Run + run.publish() + +if __name__ == '__main__': + main() \ No newline at end of file From 01f5efa23491d323af6031b932492d4ed5fe23b1 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Thu, 29 Aug 2024 12:59:34 -0700 Subject: [PATCH 02/85] Branch update --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 067b132b..c7ca65f4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,7 +5,7 @@ name: CI/CD Test on: push: branches: - - main + - CI-CD-test # Triggers the workflow on push or pull request events but only for the develop branch # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' # Specify your Python version here + python-version: '3.10' - name: Install dependencies run: | From 39a36c056ad4895e1cc32d40e1b1789bd0a3701c Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Thu, 29 Aug 2024 13:18:16 -0700 Subject: [PATCH 03/85] Update python config --- .github/workflows/test.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c7ca65f4..ca3df1b6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,11 +16,6 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Install dependencies run: | python -m pip install --upgrade pip From f6c79ab28b2efcbb92923abdf58875727b6b02d8 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Thu, 29 Aug 2024 13:21:23 -0700 Subject: [PATCH 04/85] Update python config --- .github/workflows/test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ca3df1b6..74a7aafa 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,7 +18,6 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip pip install -r requirements.txt # Install any other dependencies pip install torch From e4bed2abaab64bae101c569ff3f8d7bfd8170b91 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Thu, 29 Aug 2024 13:23:07 -0700 Subject: [PATCH 05/85] Update yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 74a7aafa..b8ef9c3a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,7 +18,7 @@ jobs: - name: Install dependencies run: | - pip install -r requirements.txt # Install any other dependencies + python -m pip install --upgrade pip pip install torch - name: Build the library From 9be62c5215437d787211843b9e9f885525d87994 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Thu, 29 Aug 2024 13:26:06 -0700 Subject: [PATCH 06/85] update yaml --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b8ef9c3a..6596f0d9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -23,6 +23,7 @@ jobs: - name: Build the library run: | + cd causalbench-asu/ pip install . - name: Run Python file From 9f11f72c2943c9f8b1d9b23c95b2d3c2d017a004 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Thu, 29 Aug 2024 13:28:28 -0700 Subject: [PATCH 07/85] update yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6596f0d9..e56c4eca 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -28,5 +28,5 @@ jobs: - name: Run Python file run: | - cd tests + cd causalbench-asu/tests python execute.py # Replace with the path to your Python file \ No newline at end of file From dbe87545fca55b0390aaa216becd55b4b89f16a2 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 12:19:25 -0700 Subject: [PATCH 08/85] Add conda --- .github/workflows/test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e56c4eca..13334493 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,7 +18,8 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip + conda create -n causal-test python=3.10 + conda activate causal-test pip install torch - name: Build the library From 58f4ad9fb784d22ac07d75c602769fc9c1685b8f Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 12:28:04 -0700 Subject: [PATCH 09/85] Conda fix --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 13334493..67337abb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,6 +19,7 @@ jobs: - name: Install dependencies run: | conda create -n causal-test python=3.10 + conda init conda activate causal-test pip install torch From 9aa58e6f71d3b90eb9eafc71139da6c26967147e Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 12:33:51 -0700 Subject: [PATCH 10/85] Conda fix --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 67337abb..fab5563a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,6 +18,7 @@ jobs: - name: Install dependencies run: | + conda --version conda create -n causal-test python=3.10 conda init conda activate causal-test From 4cad4561438ebde28eb73bb2701a1c40bc573595 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 12:36:33 -0700 Subject: [PATCH 11/85] Conda fix --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fab5563a..76651a79 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,7 +19,7 @@ jobs: - name: Install dependencies run: | conda --version - conda create -n causal-test python=3.10 + conda create -n causal-test python=3.10 -y conda init conda activate causal-test pip install torch From 65d12cc70ddf99049b0fabe480d6ab21a1b2e4c9 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 12:36:47 -0700 Subject: [PATCH 12/85] Conda fix --- .github/workflows/test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 76651a79..ca5f4873 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,7 +20,6 @@ jobs: run: | conda --version conda create -n causal-test python=3.10 -y - conda init conda activate causal-test pip install torch From ccd048c67db4c252bf52d3dee84d980a280f060e Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 12:43:29 -0700 Subject: [PATCH 13/85] Conda fix --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ca5f4873..26ca0ba9 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,6 +20,7 @@ jobs: run: | conda --version conda create -n causal-test python=3.10 -y + /usr/local/anaconda3/bin/conda init conda activate causal-test pip install torch From bd735b9e7589a5b7fbb172f33bb74f84a24f0551 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 12:46:19 -0700 Subject: [PATCH 14/85] Conda fix --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 26ca0ba9..2a505596 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,7 +20,7 @@ jobs: run: | conda --version conda create -n causal-test python=3.10 -y - /usr/local/anaconda3/bin/conda init + source activate base conda activate causal-test pip install torch From 74b8477a4ff79109869a050ee19b7f8f9fcaacf9 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 12:49:48 -0700 Subject: [PATCH 15/85] Conda fix --- .github/workflows/test.yaml | 18 ++---------------- causalbench-asu/tests/test.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 16 deletions(-) create mode 100644 causalbench-asu/tests/test.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2a505596..7464ec0d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,20 +16,6 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Install dependencies + - name: Run test.sh run: | - conda --version - conda create -n causal-test python=3.10 -y - source activate base - conda activate causal-test - pip install torch - - - name: Build the library - run: | - cd causalbench-asu/ - pip install . - - - name: Run Python file - run: | - cd causalbench-asu/tests - python execute.py # Replace with the path to your Python file \ No newline at end of file + bash test.sh \ No newline at end of file diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh new file mode 100644 index 00000000..0b34a240 --- /dev/null +++ b/causalbench-asu/tests/test.sh @@ -0,0 +1,8 @@ +conda create -n causal-test python=3.10 -y +source activate base +conda activate causal-test +pip install torch +cd causalbench-asu/ +pip install . +cd causalbench-asu/tests +python execute.py \ No newline at end of file From c818fa49370f2706217d936c321f861bba9ad53d Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 12:51:06 -0700 Subject: [PATCH 16/85] Conda fix --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7464ec0d..711ca1be 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,4 +18,5 @@ jobs: - name: Run test.sh run: | + cd causalbench-asu/tests/ bash test.sh \ No newline at end of file From 0795a072a797b868e6798a41695a4dfd363ad949 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 12:55:20 -0700 Subject: [PATCH 17/85] Conda fix --- causalbench-asu/tests/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 0b34a240..6e10a0d8 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -2,7 +2,7 @@ conda create -n causal-test python=3.10 -y source activate base conda activate causal-test pip install torch -cd causalbench-asu/ +cd ../ pip install . -cd causalbench-asu/tests +cd tests python execute.py \ No newline at end of file From 2eb4fb2b2fc963f1c16ec2b15a114e3b690deff3 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 12:59:11 -0700 Subject: [PATCH 18/85] Conda fix --- causalbench-asu/tests/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 6e10a0d8..cc43db57 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -3,6 +3,7 @@ source activate base conda activate causal-test pip install torch cd ../ +pwd pip install . cd tests python execute.py \ No newline at end of file From 6d467687cdb813dfcff764bf2c2bb0febb8c24f0 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 13:10:27 -0700 Subject: [PATCH 19/85] Conda fix --- .github/workflows/test.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 711ca1be..5cbe59d3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,7 +16,19 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Run test.sh + - name: Install dependencies run: | - cd causalbench-asu/tests/ - bash test.sh \ No newline at end of file + conda create -n causal-test python=3.10 -y + source activate base + conda activate causal-test + pip install torch + + - name: Build the library + run: | + cd causalbench-asu/ + pip install . + + - name: Run Python file + run: | + cd causalbench-asu/tests + python execute.py \ No newline at end of file From fd70c6f7e6def85c1e53f50c369d7f85e151207a Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 13:25:53 -0700 Subject: [PATCH 20/85] Conda fix --- .github/workflows/test.yaml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5cbe59d3..f472af4b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,17 +18,5 @@ jobs: - name: Install dependencies run: | - conda create -n causal-test python=3.10 -y - source activate base - conda activate causal-test - pip install torch - - - name: Build the library - run: | - cd causalbench-asu/ - pip install . - - - name: Run Python file - run: | - cd causalbench-asu/tests - python execute.py \ No newline at end of file + cd causalbench-asu/tests/ + bash test.sh \ No newline at end of file From 3eb36c364a632f2c610349b4b0bca6deca9a4e21 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 13:29:29 -0700 Subject: [PATCH 21/85] Conda fix --- .github/workflows/test.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f472af4b..5cbe59d3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,5 +18,17 @@ jobs: - name: Install dependencies run: | - cd causalbench-asu/tests/ - bash test.sh \ No newline at end of file + conda create -n causal-test python=3.10 -y + source activate base + conda activate causal-test + pip install torch + + - name: Build the library + run: | + cd causalbench-asu/ + pip install . + + - name: Run Python file + run: | + cd causalbench-asu/tests + python execute.py \ No newline at end of file From c1d2e34f3617b3e52a94ae5e71394bc990e84f37 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 13:50:13 -0700 Subject: [PATCH 22/85] Conda fix --- .github/workflows/test.yaml | 16 ++-------------- causalbench-asu/tests/test.sh | 3 +-- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5cbe59d3..4401d0e8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,17 +18,5 @@ jobs: - name: Install dependencies run: | - conda create -n causal-test python=3.10 -y - source activate base - conda activate causal-test - pip install torch - - - name: Build the library - run: | - cd causalbench-asu/ - pip install . - - - name: Run Python file - run: | - cd causalbench-asu/tests - python execute.py \ No newline at end of file + cd causalbench-asu/ + bash test.sh \ No newline at end of file diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index cc43db57..536fc113 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -3,7 +3,6 @@ source activate base conda activate causal-test pip install torch cd ../ -pwd pip install . -cd tests +cd causalbench/tests python execute.py \ No newline at end of file From b0437d6f100bc5552cb3b4bf9706e6724af1e3f2 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 13:52:05 -0700 Subject: [PATCH 23/85] Conda fix --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4401d0e8..f472af4b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,5 +18,5 @@ jobs: - name: Install dependencies run: | - cd causalbench-asu/ + cd causalbench-asu/tests/ bash test.sh \ No newline at end of file From 3260cebc16d2d8928736caa4d6961563bfa34b9e Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 13:59:04 -0700 Subject: [PATCH 24/85] Conda fix --- causalbench-asu/tests/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 536fc113..ca38f92e 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -2,7 +2,7 @@ conda create -n causal-test python=3.10 -y source activate base conda activate causal-test pip install torch -cd ../ +cd .. pip install . -cd causalbench/tests +cd /tests python execute.py \ No newline at end of file From ac05e3f46bdd80ebcaf6983329eefcafa4b568ca Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 14:01:17 -0700 Subject: [PATCH 25/85] Conda fix --- causalbench-asu/tests/test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index ca38f92e..1c8d5e17 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,5 +1,4 @@ conda create -n causal-test python=3.10 -y -source activate base conda activate causal-test pip install torch cd .. From 0a43a5138f6f076cc4c997c983d8d9dc6d92a1ec Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Fri, 30 Aug 2024 14:03:21 -0700 Subject: [PATCH 26/85] Conda fix --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 1c8d5e17..9654c4cb 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -3,5 +3,5 @@ conda activate causal-test pip install torch cd .. pip install . -cd /tests +cd tests python execute.py \ No newline at end of file From 5c729843fb31e2485ac0f4c5d038d6454f5745b2 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Tue, 3 Sep 2024 12:01:21 -0700 Subject: [PATCH 27/85] Fix conda install --- causalbench-asu/tests/test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 9654c4cb..81ac3e05 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,3 +1,7 @@ +mkdir -p ~/miniconda3 +curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh +bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 +rm ~/miniconda3/miniconda.sh conda create -n causal-test python=3.10 -y conda activate causal-test pip install torch From d7368f290406d574c7b1cc8a3ccf5f5eb56849cc Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Tue, 3 Sep 2024 12:03:23 -0700 Subject: [PATCH 28/85] Fix conda install --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 81ac3e05..1f26576d 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,5 +1,5 @@ mkdir -p ~/miniconda3 -curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh +curl https://repo.anaconda.com/miniconda/Miniconda3-py39_24.5.0-0-MacOSX-x86_64.sh -o ~/miniconda/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm ~/miniconda3/miniconda.sh conda create -n causal-test python=3.10 -y From f9d6fce1200dc88a20be477333bbc187035ec51e Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Tue, 3 Sep 2024 12:24:15 -0700 Subject: [PATCH 29/85] Fix conda install --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 1f26576d..8301379e 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,5 +1,5 @@ mkdir -p ~/miniconda3 -curl https://repo.anaconda.com/miniconda/Miniconda3-py39_24.5.0-0-MacOSX-x86_64.sh -o ~/miniconda/miniconda.sh +curl https://repo.anaconda.com/miniconda/Miniconda3-py39_24.5.0-0-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm ~/miniconda3/miniconda.sh conda create -n causal-test python=3.10 -y From a8a0fa7d1b10ecffe8d8874c149fb46631c6ca4b Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Tue, 3 Sep 2024 12:36:37 -0700 Subject: [PATCH 30/85] Fix conda install --- causalbench-asu/tests/test.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 8301379e..9654c4cb 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,7 +1,3 @@ -mkdir -p ~/miniconda3 -curl https://repo.anaconda.com/miniconda/Miniconda3-py39_24.5.0-0-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh -bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 -rm ~/miniconda3/miniconda.sh conda create -n causal-test python=3.10 -y conda activate causal-test pip install torch From 95b8d703caebcdf3018a4aec4e146891fdf426ce Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Tue, 3 Sep 2024 12:48:13 -0700 Subject: [PATCH 31/85] Fix conda install --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 9654c4cb..6d4bfcaf 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,4 +1,4 @@ -conda create -n causal-test python=3.10 -y +conda create -n causal-test-1 python=3.10 -y conda activate causal-test pip install torch cd .. From 7fce7d7f978098f54dffc766042a19aed8824d7d Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Tue, 3 Sep 2024 12:52:01 -0700 Subject: [PATCH 32/85] Fix conda install --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 6d4bfcaf..9654c4cb 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,4 +1,4 @@ -conda create -n causal-test-1 python=3.10 -y +conda create -n causal-test python=3.10 -y conda activate causal-test pip install torch cd .. From fcd05c0efe870c375a426ddddde9950ff478bf77 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Tue, 3 Sep 2024 12:54:54 -0700 Subject: [PATCH 33/85] Fix conda install --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 9654c4cb..6d4bfcaf 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,4 +1,4 @@ -conda create -n causal-test python=3.10 -y +conda create -n causal-test-1 python=3.10 -y conda activate causal-test pip install torch cd .. From fb63b9fef3b19984baadbb4f6f207441d02a356a Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Tue, 3 Sep 2024 13:05:06 -0700 Subject: [PATCH 34/85] Fix conda install --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 6d4bfcaf..9654c4cb 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,4 +1,4 @@ -conda create -n causal-test-1 python=3.10 -y +conda create -n causal-test python=3.10 -y conda activate causal-test pip install torch cd .. From e9bc3f07e0bed7a6e8004878c560e6913ee494f6 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:54:25 -0700 Subject: [PATCH 35/85] Update test.sh --- causalbench-asu/tests/test.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 9654c4cb..ea2d1d91 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,7 +1,9 @@ conda create -n causal-test python=3.10 -y conda activate causal-test pip install torch -cd .. -pip install . +cd ../.. +pip install build +python -m build +pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl cd tests -python execute.py \ No newline at end of file +python execute.py From 1b0204f7a2fded72e64e5c720981f969985bb821 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:55:58 -0700 Subject: [PATCH 36/85] Update test.sh --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index ea2d1d91..178544b8 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -5,5 +5,5 @@ cd ../.. pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl -cd tests +cd causalbench-asu/tests python execute.py From 64f3f20eea3c63dd8ec33299790f9e2b6fac0b60 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:57:57 -0700 Subject: [PATCH 37/85] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f472af4b..934c6f60 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,4 +19,4 @@ jobs: - name: Install dependencies run: | cd causalbench-asu/tests/ - bash test.sh \ No newline at end of file + bash -l test.sh From 06e91457bf40f022a2e65ac66dc1e67d0a3d3d81 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:04:43 -0700 Subject: [PATCH 38/85] Update test.sh --- causalbench-asu/tests/test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 178544b8..ae13c9bf 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,6 +1,5 @@ conda create -n causal-test python=3.10 -y conda activate causal-test -pip install torch cd ../.. pip install build python -m build From e212c3748709830a2bda1636d28220f82ef7564c Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:06:08 -0700 Subject: [PATCH 39/85] Update test.sh --- causalbench-asu/tests/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index ae13c9bf..41fab2d2 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,5 +1,6 @@ conda create -n causal-test python=3.10 -y conda activate causal-test +pip install torch==2.3.0 cd ../.. pip install build python -m build From 6bbe83efa0b0aa4bc213edd8d250138af866de89 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:07:52 -0700 Subject: [PATCH 40/85] Update test.sh --- causalbench-asu/tests/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 41fab2d2..2e1a005c 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,6 +1,7 @@ conda create -n causal-test python=3.10 -y conda activate causal-test -pip install torch==2.3.0 +python -m pip install --upgrade pip +pip install torch cd ../.. pip install build python -m build From 741393812f5fa2a538f6e45f8d7ef314d7035987 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:09:24 -0700 Subject: [PATCH 41/85] Update test.sh --- causalbench-asu/tests/test.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 2e1a005c..95fb0519 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,10 +1,9 @@ conda create -n causal-test python=3.10 -y conda activate causal-test -python -m pip install --upgrade pip -pip install torch +python3 -m pip install --upgrade pip cd ../.. -pip install build +pip3 install build python -m build -pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl +pip3 install dist/causalbench_asu-0.1rc1-py3-none-any.whl cd causalbench-asu/tests -python execute.py +python3 execute.py From ea0a7c88f4b359807b024068c9180a4297a8426b Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:12:00 -0700 Subject: [PATCH 42/85] Update test.sh --- causalbench-asu/tests/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 95fb0519..81f8bc5f 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -2,6 +2,7 @@ conda create -n causal-test python=3.10 -y conda activate causal-test python3 -m pip install --upgrade pip cd ../.. +pip3 install torch pip3 install build python -m build pip3 install dist/causalbench_asu-0.1rc1-py3-none-any.whl From d813b9edf8915148a7ff0b7c1e4f6ee0617d8391 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:13:38 -0700 Subject: [PATCH 43/85] Update test.sh --- causalbench-asu/tests/test.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 81f8bc5f..826d4f61 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,10 +1,10 @@ conda create -n causal-test python=3.10 -y conda activate causal-test -python3 -m pip install --upgrade pip +python -m pip install --upgrade pip cd ../.. -pip3 install torch -pip3 install build +pip install torch +pip install build python -m build -pip3 install dist/causalbench_asu-0.1rc1-py3-none-any.whl +pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl cd causalbench-asu/tests -python3 execute.py +python execute.py From 7f770fb36d5328514766960b54c44f00757f3a55 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:23:08 -0700 Subject: [PATCH 44/85] Update test.sh --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 826d4f61..b78398cc 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -2,7 +2,7 @@ conda create -n causal-test python=3.10 -y conda activate causal-test python -m pip install --upgrade pip cd ../.. -pip install torch +pip install torch==2.3 pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl From 9fb3333a63e930a7dc06ad275338f0732b9b06cf Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:26:26 -0700 Subject: [PATCH 45/85] Update test.sh --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index b78398cc..73d91bc6 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -2,7 +2,7 @@ conda create -n causal-test python=3.10 -y conda activate causal-test python -m pip install --upgrade pip cd ../.. -pip install torch==2.3 +pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl From cb3b562e6a32a877920895dca6f4799956895a9b Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:28:50 -0700 Subject: [PATCH 46/85] Update test.sh --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 73d91bc6..bc125ad1 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -2,7 +2,7 @@ conda create -n causal-test python=3.10 -y conda activate causal-test python -m pip install --upgrade pip cd ../.. -pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 +conda install pytorch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 -c pytorch pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl From 870b73d550b62290763f81d3884900e505e2b8db Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:31:08 -0700 Subject: [PATCH 47/85] Update test.sh --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index bc125ad1..b78398cc 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -2,7 +2,7 @@ conda create -n causal-test python=3.10 -y conda activate causal-test python -m pip install --upgrade pip cd ../.. -conda install pytorch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 -c pytorch +pip install torch==2.3 pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl From ce3894f6893574a2b957a67cd8913de8b9199cae Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:35:24 -0700 Subject: [PATCH 48/85] Update test.sh --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index b78398cc..ac3d0db1 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -2,7 +2,7 @@ conda create -n causal-test python=3.10 -y conda activate causal-test python -m pip install --upgrade pip cd ../.. -pip install torch==2.3 +pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cpu pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl From 635c14355deff9c7caaecd6545645df04c44ed07 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:38:11 -0700 Subject: [PATCH 49/85] Update test.sh --- causalbench-asu/tests/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index ac3d0db1..9cbe5903 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,8 +1,8 @@ -conda create -n causal-test python=3.10 -y +conda create -n causal-test python=3.10.14 -y conda activate causal-test python -m pip install --upgrade pip cd ../.. -pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cpu +pip install torch==2.3.0 pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl From 30c66e6010a3fc83a35ba8d32805c6fd054f8687 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:41:10 -0700 Subject: [PATCH 50/85] Update test.sh --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 9cbe5903..46cbfc6a 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -2,7 +2,7 @@ conda create -n causal-test python=3.10.14 -y conda activate causal-test python -m pip install --upgrade pip cd ../.. -pip install torch==2.3.0 +pip install torch==2.3.0 --index-url https://download.pytorch.org/whl/cpu-cxx11-abi/torch-2.3.0%2Bcpu.cxx11.abi-cp310-cp310-linux_x86_64.whl pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl From 57ab303400b8fec6031a03367e7856ff54dc91a8 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:49:39 -0700 Subject: [PATCH 51/85] Update test.sh --- causalbench-asu/tests/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 46cbfc6a..cf4d350c 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,8 +1,8 @@ -conda create -n causal-test python=3.10.14 -y +conda create -n causal-test python=3.10.6 -y conda activate causal-test python -m pip install --upgrade pip cd ../.. -pip install torch==2.3.0 --index-url https://download.pytorch.org/whl/cpu-cxx11-abi/torch-2.3.0%2Bcpu.cxx11.abi-cp310-cp310-linux_x86_64.whl +pip install torch==2.3.0 --index-url https://download.pytorch.org/whl/torch_stable.html pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl From 9eb2ffd6defaab98a0d6a194bc9e66e0c9b88123 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:51:46 -0700 Subject: [PATCH 52/85] Update test.sh --- causalbench-asu/tests/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index cf4d350c..7621e27c 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,8 +1,8 @@ -conda create -n causal-test python=3.10.6 -y +conda create -n causal-test python=3.10 -y conda activate causal-test python -m pip install --upgrade pip cd ../.. -pip install torch==2.3.0 --index-url https://download.pytorch.org/whl/torch_stable.html +pip3 install torch==2.3.0 pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl From 674d4c82d0ca98e0bd192cdd762ef8d7ebce3422 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:53:23 -0700 Subject: [PATCH 53/85] Update test.sh --- causalbench-asu/tests/test.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 7621e27c..7635824e 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,8 +1,7 @@ conda create -n causal-test python=3.10 -y conda activate causal-test -python -m pip install --upgrade pip cd ../.. -pip3 install torch==2.3.0 +pip install torch==2.3.0 pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl From b93b4c53e76a0ab9ccb554c862e78b26d68c9911 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:58:22 -0700 Subject: [PATCH 54/85] Update test.sh --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 7635824e..825c9a72 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,7 +1,7 @@ conda create -n causal-test python=3.10 -y conda activate causal-test cd ../.. -pip install torch==2.3.0 +python -m pip install torch==2.3 pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl From c2c5bd673a889bdcba5c5d5fffeb32c02ef3894a Mon Sep 17 00:00:00 2001 From: Ahmet Kapkic Date: Thu, 5 Sep 2024 11:01:49 -0700 Subject: [PATCH 55/85] Update test.sh Added print statements --- causalbench-asu/tests/test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 825c9a72..ae8f2cf0 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,9 +1,12 @@ +echo "Creating conda environment..." conda create -n causal-test python=3.10 -y conda activate causal-test cd ../.. -python -m pip install torch==2.3 +echo "Building package..." +#python -m pip install torch==2.3 pip install build python -m build pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl cd causalbench-asu/tests +echo "Tests executing" python execute.py From eaef18ff0a79c09c92787d169f9eb3d1e482b356 Mon Sep 17 00:00:00 2001 From: Ahmet Kapkic Date: Thu, 5 Sep 2024 11:05:32 -0700 Subject: [PATCH 56/85] Update pyproject.toml This was behind 2 commits from the latest package. --- pyproject.toml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d690fda3..43888f46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "causalbench-asu" -version = "0.1rc1" +version = "0.1rc3" authors = [ { name="CausalBench Team", email="support@causalbench.org"} ] @@ -26,7 +26,6 @@ classifiers = [ ] dependencies = [ - "gputil", "requests", "pyyaml", "bunch_py3", @@ -36,9 +35,8 @@ dependencies = [ "psutil", "py-cpuinfo", "pip-system-certs", - "pyadl", - "gcastle", - "torch~=2.3.0" + "gputil", + "pyadl" ] [project.urls] @@ -51,4 +49,4 @@ Issues = "https://github.com/EmitLab/CausalBench/issues" only-include = ["causalbench-asu"] [tool.hatch.build.targets.wheel] -packages = ["causalbench-asu/causalbench"] \ No newline at end of file +packages = ["causalbench-asu/causalbench"] From 5d065e5f40a0ed453749b48732e70d7d15b5c28b Mon Sep 17 00:00:00 2001 From: Ahmet Kapkic Date: Thu, 5 Sep 2024 11:14:34 -0700 Subject: [PATCH 57/85] Update test.sh Fixes on package name. --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index ae8f2cf0..e618fe94 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -6,7 +6,7 @@ echo "Building package..." #python -m pip install torch==2.3 pip install build python -m build -pip install dist/causalbench_asu-0.1rc1-py3-none-any.whl +pip install dist/causalbench_asu-0.1rc3-py3-none-any.whl cd causalbench-asu/tests echo "Tests executing" python execute.py From 3b6f41f0fbf36c801565877e035c2166e565eacd Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Thu, 5 Sep 2024 12:53:06 -0700 Subject: [PATCH 58/85] Update test.sh --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index e618fe94..8e61e61b 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -3,7 +3,7 @@ conda create -n causal-test python=3.10 -y conda activate causal-test cd ../.. echo "Building package..." -#python -m pip install torch==2.3 +pip install castle pip install build python -m build pip install dist/causalbench_asu-0.1rc3-py3-none-any.whl From d2cef1b9c6ef1f1795621fcbd706cf363f7ac615 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Thu, 5 Sep 2024 12:55:50 -0700 Subject: [PATCH 59/85] Update test.sh --- causalbench-asu/tests/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 8e61e61b..8abf833e 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -3,7 +3,7 @@ conda create -n causal-test python=3.10 -y conda activate causal-test cd ../.. echo "Building package..." -pip install castle +pip install gcastle pip install build python -m build pip install dist/causalbench_asu-0.1rc3-py3-none-any.whl From 29d403cb4c698d3ce39754ed81ce9205c18231f3 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Thu, 5 Sep 2024 13:41:35 -0700 Subject: [PATCH 60/85] Update test.sh --- causalbench-asu/tests/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 8abf833e..ea95a14b 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -4,6 +4,7 @@ conda activate causal-test cd ../.. echo "Building package..." pip install gcastle +pip install torch pip install build python -m build pip install dist/causalbench_asu-0.1rc3-py3-none-any.whl From c9b2f8abed3427fb716d7706140a368af59122b6 Mon Sep 17 00:00:00 2001 From: Ahmet Kapkic Date: Mon, 9 Sep 2024 12:45:11 -0700 Subject: [PATCH 61/85] Update test.yaml Added strategy-multiple runners --- .github/workflows/test.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 934c6f60..972685eb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,7 +11,10 @@ on: workflow_dispatch: jobs: build: - runs-on: self-hosted + strategy: + matrix: + os: [self-hosted] + runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v3 From 53fb18240442b302fc364598ff98fda744e1cd26 Mon Sep 17 00:00:00 2001 From: Ahmet Kapkic Date: Mon, 9 Sep 2024 12:46:17 -0700 Subject: [PATCH 62/85] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 972685eb..f8418d57 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,7 +13,7 @@ jobs: build: strategy: matrix: - os: [self-hosted] + os: [self-hosted, Linux, Windows, macOS] runs-on: ${{ matrix.os }} steps: - name: Checkout code From ff4630fcdae9765aea6a7e9cc2906c775f353876 Mon Sep 17 00:00:00 2001 From: Ahmet Kapkic Date: Mon, 9 Sep 2024 12:47:52 -0700 Subject: [PATCH 63/85] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f8418d57..e68bf397 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -13,7 +13,7 @@ jobs: build: strategy: matrix: - os: [self-hosted, Linux, Windows, macOS] + os: [Linux, Windows, macOS] runs-on: ${{ matrix.os }} steps: - name: Checkout code From cd2a09953e5b418f7337b070212b637a64a797bc Mon Sep 17 00:00:00 2001 From: Ahmet Kapkic Date: Mon, 9 Sep 2024 12:49:35 -0700 Subject: [PATCH 64/85] Update test.yaml --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e68bf397..8d4389e2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,6 +12,7 @@ on: jobs: build: strategy: + fail-fast: false matrix: os: [Linux, Windows, macOS] runs-on: ${{ matrix.os }} From 0cc61c92022235e9d4b0b240c18a162bf51e3c80 Mon Sep 17 00:00:00 2001 From: Ahmet Kapkic Date: Mon, 9 Sep 2024 12:50:08 -0700 Subject: [PATCH 65/85] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8d4389e2..a2ffba2c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,7 +12,7 @@ on: jobs: build: strategy: - fail-fast: false + fail-fast: false matrix: os: [Linux, Windows, macOS] runs-on: ${{ matrix.os }} From 976e2d58ce3fe51584ccfb229eb754436c9ea6a7 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:44:21 -0700 Subject: [PATCH 66/85] Create test.bat --- causalbench-asu/tests/test.bat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 causalbench-asu/tests/test.bat diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.bat new file mode 100644 index 00000000..9cc359a1 --- /dev/null +++ b/causalbench-asu/tests/test.bat @@ -0,0 +1,15 @@ +echo Creating conda environment... +conda create -n causal-test python=3.10 -y +call conda activate causal-test + +cd ../.. +echo Building package... +pip install gcastle +pip install torch +pip install build +python -m build +pip install dist\causalbench_asu-0.1rc3-py3-none-any.whl + +cd causalbench-asu\tests +echo Tests executing +python execute.py From 4e454ad7ab8855ddd93283b32ef7bb7bb7539a7d Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:46:55 -0700 Subject: [PATCH 67/85] Update test.yaml --- .github/workflows/test.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a2ffba2c..7a041a64 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -21,6 +21,13 @@ jobs: uses: actions/checkout@v3 - name: Install dependencies + if: matrix.os != 'Windows' run: | cd causalbench-asu/tests/ bash -l test.sh + + - name: Install dependencies for Windows + if: matrix.os == 'Windows' + run: | + cd causalbench-asu/tests/ + bash -l test.bat From b3f5cbb2ca7f038be4e4722a30e0b73d6350d0f8 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:48:46 -0700 Subject: [PATCH 68/85] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7a041a64..e492f5f2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,4 +30,4 @@ jobs: if: matrix.os == 'Windows' run: | cd causalbench-asu/tests/ - bash -l test.bat + .\test.bat From 02e25ef7c8e1f2f69d001d135c8a554961cf10cb Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:01:26 -0700 Subject: [PATCH 69/85] Update test.bat --- causalbench-asu/tests/test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.bat index 9cc359a1..0cf6cb05 100644 --- a/causalbench-asu/tests/test.bat +++ b/causalbench-asu/tests/test.bat @@ -1,6 +1,6 @@ echo Creating conda environment... conda create -n causal-test python=3.10 -y -call conda activate causal-test +conda activate causal-test cd ../.. echo Building package... From ff205e18e573e29d523910f6dc3e4ff4dcca72d7 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:02:33 -0700 Subject: [PATCH 70/85] Rename test.bat to test.cmd --- causalbench-asu/tests/{test.bat => test.cmd} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename causalbench-asu/tests/{test.bat => test.cmd} (100%) diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.cmd similarity index 100% rename from causalbench-asu/tests/test.bat rename to causalbench-asu/tests/test.cmd From 0050142662ba8f56d9b8ef00d1e4cc0de312f2a4 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:44:32 -0700 Subject: [PATCH 71/85] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e492f5f2..dc6caa3f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,4 +30,4 @@ jobs: if: matrix.os == 'Windows' run: | cd causalbench-asu/tests/ - .\test.bat + .\test.cmd From 27a1df6fe9c64a2ebe38568627ea3329077e87d9 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:45:09 -0700 Subject: [PATCH 72/85] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dc6caa3f..e492f5f2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,4 +30,4 @@ jobs: if: matrix.os == 'Windows' run: | cd causalbench-asu/tests/ - .\test.cmd + .\test.bat From 8cf8d54b1c7c53bc05ead4090e24965b9a2cc2e1 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:45:34 -0700 Subject: [PATCH 73/85] Rename test.cmd to test.bat --- causalbench-asu/tests/{test.cmd => test.bat} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename causalbench-asu/tests/{test.cmd => test.bat} (100%) diff --git a/causalbench-asu/tests/test.cmd b/causalbench-asu/tests/test.bat similarity index 100% rename from causalbench-asu/tests/test.cmd rename to causalbench-asu/tests/test.bat From ee20f11338f87de24b065f30ad06b5366fcf1d36 Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Mon, 9 Sep 2024 17:56:11 -0700 Subject: [PATCH 74/85] Update test.bat --- causalbench-asu/tests/test.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.bat index 0cf6cb05..7a75a2b7 100644 --- a/causalbench-asu/tests/test.bat +++ b/causalbench-asu/tests/test.bat @@ -1,6 +1,8 @@ echo Creating conda environment... conda create -n causal-test python=3.10 -y +echo Conda environment is created conda activate causal-test +echo Conda environment is activated cd ../.. echo Building package... From fc76fd90896bd7cd1edc9ecb206af435a5ee558f Mon Sep 17 00:00:00 2001 From: ertugrulcobann <134216135+ertugrulcobann@users.noreply.github.com> Date: Mon, 9 Sep 2024 19:28:13 -0700 Subject: [PATCH 75/85] Update test.bat --- causalbench-asu/tests/test.bat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.bat index 7a75a2b7..75a7e6a6 100644 --- a/causalbench-asu/tests/test.bat +++ b/causalbench-asu/tests/test.bat @@ -1,7 +1,8 @@ +@echo off echo Creating conda environment... -conda create -n causal-test python=3.10 -y +call conda create -n causal-test python=3.10 -y echo Conda environment is created -conda activate causal-test +call conda activate causal-test echo Conda environment is activated cd ../.. From 8ec30945634cf9c10e75638641f4eb150d86b593 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Wed, 11 Sep 2024 15:41:37 -0700 Subject: [PATCH 76/85] Test case for login --- causalbench-asu/tests/test-auth.py | 8 ++++++++ causalbench-asu/tests/{execute.py => test-execute.py} | 0 causalbench-asu/tests/test.bat | 2 +- causalbench-asu/tests/test.sh | 4 +++- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 causalbench-asu/tests/test-auth.py rename causalbench-asu/tests/{execute.py => test-execute.py} (100%) diff --git a/causalbench-asu/tests/test-auth.py b/causalbench-asu/tests/test-auth.py new file mode 100644 index 00000000..1dc5fe38 --- /dev/null +++ b/causalbench-asu/tests/test-auth.py @@ -0,0 +1,8 @@ +import pytest + + +from causalbench.services.auth import init_auth + +access_token = init_auth() + +assert access_token, "Could not logged in." \ No newline at end of file diff --git a/causalbench-asu/tests/execute.py b/causalbench-asu/tests/test-execute.py similarity index 100% rename from causalbench-asu/tests/execute.py rename to causalbench-asu/tests/test-execute.py diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.bat index 75a7e6a6..0d2171fa 100644 --- a/causalbench-asu/tests/test.bat +++ b/causalbench-asu/tests/test.bat @@ -15,4 +15,4 @@ pip install dist\causalbench_asu-0.1rc3-py3-none-any.whl cd causalbench-asu\tests echo Tests executing -python execute.py +python test-execute.py diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index ea95a14b..41852a2e 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -10,4 +10,6 @@ python -m build pip install dist/causalbench_asu-0.1rc3-py3-none-any.whl cd causalbench-asu/tests echo "Tests executing" -python execute.py +python test-execute.py +echo "Test login function" +python test-auth.py From ad1c4bd7eb6e26f1b9f8cd079ed5f92eb24a104a Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Wed, 11 Sep 2024 15:45:50 -0700 Subject: [PATCH 77/85] Test case for login --- causalbench-asu/tests/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 41852a2e..3f528e5f 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -8,8 +8,9 @@ pip install torch pip install build python -m build pip install dist/causalbench_asu-0.1rc3-py3-none-any.whl +pip install pytest cd causalbench-asu/tests echo "Tests executing" python test-execute.py -echo "Test login function" +echo "Tests login function" python test-auth.py From e3031fc6ab8f504c75ddcc6d53d96a1361baa4ac Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Wed, 11 Sep 2024 16:32:29 -0700 Subject: [PATCH 78/85] Test case for login --- causalbench-asu/tests/test-auth.py | 28 +++++++++++++++++++++++++--- causalbench-asu/tests/test.bat | 6 ++++-- causalbench-asu/tests/test.sh | 4 ++-- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/causalbench-asu/tests/test-auth.py b/causalbench-asu/tests/test-auth.py index 1dc5fe38..9c8896b3 100644 --- a/causalbench-asu/tests/test-auth.py +++ b/causalbench-asu/tests/test-auth.py @@ -1,8 +1,30 @@ import pytest +from causalbench.services.auth import init_auth +import jwt + +def is_jwt(token): + + # Split the token into parts + parts = token.split('.') + + # A valid JWT should have exactly 3 parts + if len(parts) != 3: + return False + + try: + header = jwt.get_unverified_header(token) + + return True + except Exception as e: + print(f"Invalid JWT token: {e}") + return False + -from causalbench.services.auth import init_auth -access_token = init_auth() +# Take some config yaml file, and copy to its location. +## can be ignored for now as ertugrul's creds are already there. +response = init_auth() -assert access_token, "Could not logged in." \ No newline at end of file +assert is_jwt(response)==False, "Response is in JWT format and it is an access token." +assert is_jwt(response)==True, "Response is not in JWT format. Access token could not received" \ No newline at end of file diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.bat index 0d2171fa..419730a0 100644 --- a/causalbench-asu/tests/test.bat +++ b/causalbench-asu/tests/test.bat @@ -14,5 +14,7 @@ python -m build pip install dist\causalbench_asu-0.1rc3-py3-none-any.whl cd causalbench-asu\tests -echo Tests executing -python test-execute.py +echo "Test system" +python test-execute.py +echo "Test login function" +python test-auth.py diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 3f528e5f..263869da 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -10,7 +10,7 @@ python -m build pip install dist/causalbench_asu-0.1rc3-py3-none-any.whl pip install pytest cd causalbench-asu/tests -echo "Tests executing" +echo "Test system" python test-execute.py -echo "Tests login function" +echo "Test login function" python test-auth.py From da334a7b8be22d2bee7184b40e63a6a51bbb29e1 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Wed, 11 Sep 2024 16:37:51 -0700 Subject: [PATCH 79/85] Test case for login --- causalbench-asu/tests/test.bat | 4 ++-- causalbench-asu/tests/test.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.bat index 419730a0..d7438da3 100644 --- a/causalbench-asu/tests/test.bat +++ b/causalbench-asu/tests/test.bat @@ -4,7 +4,6 @@ call conda create -n causal-test python=3.10 -y echo Conda environment is created call conda activate causal-test echo Conda environment is activated - cd ../.. echo Building package... pip install gcastle @@ -12,7 +11,8 @@ pip install torch pip install build python -m build pip install dist\causalbench_asu-0.1rc3-py3-none-any.whl - +pip install PyJWT +pip install pytest cd causalbench-asu\tests echo "Test system" python test-execute.py diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 263869da..da56b073 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -9,6 +9,7 @@ pip install build python -m build pip install dist/causalbench_asu-0.1rc3-py3-none-any.whl pip install pytest +pip install PyJWT cd causalbench-asu/tests echo "Test system" python test-execute.py From a7efcc44bd56351b11b637da09499bf5f31c0182 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Wed, 11 Sep 2024 16:43:36 -0700 Subject: [PATCH 80/85] Test case for login --- causalbench-asu/tests/test-auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/causalbench-asu/tests/test-auth.py b/causalbench-asu/tests/test-auth.py index 9c8896b3..8985250c 100644 --- a/causalbench-asu/tests/test-auth.py +++ b/causalbench-asu/tests/test-auth.py @@ -26,5 +26,5 @@ def is_jwt(token): ## can be ignored for now as ertugrul's creds are already there. response = init_auth() -assert is_jwt(response)==False, "Response is in JWT format and it is an access token." -assert is_jwt(response)==True, "Response is not in JWT format. Access token could not received" \ No newline at end of file +assert is_jwt(response), "Response is not in JWT format. Access token could not received" +print("Response is in JWT format and it is an access token.") \ No newline at end of file From 3d2ff40f06c6bb65c6e3ccb148d4510380cf9478 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Mon, 16 Sep 2024 10:54:06 -0700 Subject: [PATCH 81/85] Add test cases --- causalbench-asu/tests/test-data.py | 17 +++++++++++++++++ causalbench-asu/tests/test-metric.py | 10 ++++++++++ causalbench-asu/tests/test-model.py | 12 ++++++++++++ causalbench-asu/tests/test-task.py | 5 +++++ causalbench-asu/tests/test.sh | 8 ++++++++ 5 files changed, 52 insertions(+) create mode 100644 causalbench-asu/tests/test-data.py create mode 100644 causalbench-asu/tests/test-metric.py create mode 100644 causalbench-asu/tests/test-model.py create mode 100644 causalbench-asu/tests/test-task.py diff --git a/causalbench-asu/tests/test-data.py b/causalbench-asu/tests/test-data.py new file mode 100644 index 00000000..e8c5937f --- /dev/null +++ b/causalbench-asu/tests/test-data.py @@ -0,0 +1,17 @@ +from causalbench.modules import Dataset +import pytest +import pandas as pd + +dataset_web = Dataset(module_id=2, version=1) +fetched_web = dataset_web.fetch() +data_web = Dataset(zip_file=fetched_web) +files_web = data_web.load() +assert isinstance(files_web["file1"].data, pd.DataFrame), "Dataset from causalbench could not be fetched." + + +dataset = Dataset(zip_file='data/abalone.zip') +files = dataset.load() +assert isinstance(files["file1"].data, pd.DataFrame), "Local data could not be extracted." + + +#dataset1.publish(public=False) diff --git a/causalbench-asu/tests/test-metric.py b/causalbench-asu/tests/test-metric.py new file mode 100644 index 00000000..75fe91b6 --- /dev/null +++ b/causalbench-asu/tests/test-metric.py @@ -0,0 +1,10 @@ +from causalbench.modules import Metric + +metric_web = Metric(module_id=1, version=1) +metric_path = metric_web.fetch() +metric_web = Metric(zip_file=metric_path) +assert metric_web.type=="metric", "Metric could not be fetched from web." + +metric_local = Metric(zip_file='metric/accuracy_static.zip') +assert metric_local.type=="metric", "Metric could not be fetched from web." +#metric_local.publish(public=True) \ No newline at end of file diff --git a/causalbench-asu/tests/test-model.py b/causalbench-asu/tests/test-model.py new file mode 100644 index 00000000..13271cc4 --- /dev/null +++ b/causalbench-asu/tests/test-model.py @@ -0,0 +1,12 @@ +from causalbench.modules import Model + + +model_web = Model(module_id=4, version=1) +model_path = model_web.fetch() +model1 = Model(zip_file=model_path) +#model1.publish(public=True) +assert model1.type=="model", "Model could not be fetched from web." + +model2 = Model(zip_file='model/ges.zip') +#model2.publish(public=True) +assert model2.type=="model", "Local model could not be extracted." diff --git a/causalbench-asu/tests/test-task.py b/causalbench-asu/tests/test-task.py new file mode 100644 index 00000000..c61b47c5 --- /dev/null +++ b/causalbench-asu/tests/test-task.py @@ -0,0 +1,5 @@ +from causalbench.modules.task import Task + +task: Task = Task(module_id='discovery.temporal') +task.load() +assert task.type=="task", "Task could not be fetched from web." diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index da56b073..54efaa11 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -15,3 +15,11 @@ echo "Test system" python test-execute.py echo "Test login function" python test-auth.py +echo "Test dataset functions" +python test-data.py +echo "Test model functions" +python test-model.py +echo "Test metric functions" +python test-metric.py +echo "Test task functions" +python test-task.py From e48e5a8953cddec6a1652c5f19fe34ee6badefd2 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Mon, 16 Sep 2024 16:10:08 -0700 Subject: [PATCH 82/85] sh fixes --- causalbench-asu/tests/test.bat | 15 +++++++++++++-- causalbench-asu/tests/test.sh | 7 ++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.bat index d7438da3..e95b6cbf 100644 --- a/causalbench-asu/tests/test.bat +++ b/causalbench-asu/tests/test.bat @@ -6,11 +6,14 @@ call conda activate causal-test echo Conda environment is activated cd ../.. echo Building package... + +# Model dependicies are not installed automatically so needs to be installed manually until fix pip install gcastle -pip install torch +pip install torch + pip install build python -m build -pip install dist\causalbench_asu-0.1rc3-py3-none-any.whl +pip install $(ls dist/*.whl | sort | tail -n 1) pip install PyJWT pip install pytest cd causalbench-asu\tests @@ -18,3 +21,11 @@ echo "Test system" python test-execute.py echo "Test login function" python test-auth.py +echo "Test dataset functions" +python test-data.py +echo "Test model functions" +python test-model.py +echo "Test metric functions" +python test-metric.py +echo "Test task functions" +python test-task.py diff --git a/causalbench-asu/tests/test.sh b/causalbench-asu/tests/test.sh index 54efaa11..d874f8ee 100644 --- a/causalbench-asu/tests/test.sh +++ b/causalbench-asu/tests/test.sh @@ -1,13 +1,18 @@ echo "Creating conda environment..." conda create -n causal-test python=3.10 -y +echo Conda environment is created conda activate causal-test +echo Conda environment is activated cd ../.. echo "Building package..." + +# Model dependicies are not installed automatically so needs to be installed manually until fix pip install gcastle pip install torch + pip install build python -m build -pip install dist/causalbench_asu-0.1rc3-py3-none-any.whl +pip install $(ls dist/*.whl | sort | tail -n 1) pip install pytest pip install PyJWT cd causalbench-asu/tests From 1c5ba92dc8f667a146c4c70c2b70285961b93629 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Mon, 16 Sep 2024 16:14:50 -0700 Subject: [PATCH 83/85] sh fixes --- causalbench-asu/tests/test.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.bat index e95b6cbf..25f06f96 100644 --- a/causalbench-asu/tests/test.bat +++ b/causalbench-asu/tests/test.bat @@ -13,7 +13,8 @@ pip install torch pip install build python -m build -pip install $(ls dist/*.whl | sort | tail -n 1) +for /f "delims=" %%f in ('dir /b /o-d dist\*.whl') do pip install dist\%%f & goto :end +:end pip install PyJWT pip install pytest cd causalbench-asu\tests From a6988c18f4efb1295d00cefd3d9eca9d28c2fe17 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Mon, 16 Sep 2024 16:21:56 -0700 Subject: [PATCH 84/85] sh fixes --- causalbench-asu/tests/test.bat | 1 - 1 file changed, 1 deletion(-) diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.bat index 25f06f96..f324d2c2 100644 --- a/causalbench-asu/tests/test.bat +++ b/causalbench-asu/tests/test.bat @@ -14,7 +14,6 @@ pip install torch pip install build python -m build for /f "delims=" %%f in ('dir /b /o-d dist\*.whl') do pip install dist\%%f & goto :end -:end pip install PyJWT pip install pytest cd causalbench-asu\tests From bd370b2e5c98b60fe00db8717f2111c1f79d3064 Mon Sep 17 00:00:00 2001 From: ertugrulcobann Date: Mon, 16 Sep 2024 16:25:19 -0700 Subject: [PATCH 85/85] sh fixes --- causalbench-asu/tests/test.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/causalbench-asu/tests/test.bat b/causalbench-asu/tests/test.bat index f324d2c2..25f06f96 100644 --- a/causalbench-asu/tests/test.bat +++ b/causalbench-asu/tests/test.bat @@ -14,6 +14,7 @@ pip install torch pip install build python -m build for /f "delims=" %%f in ('dir /b /o-d dist\*.whl') do pip install dist\%%f & goto :end +:end pip install PyJWT pip install pytest cd causalbench-asu\tests