From 5fa193ece69a125f8d471b70486885acb10295bc Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 15:26:39 +0100 Subject: [PATCH 01/55] Remove iframe and add comment tags for best_runs section --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 75fc208d..988053a7 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,9 @@ We use the classification models available in [tsai library](https://timeseriesa ## Results You can find the results in the following table: - + + + ## Authors From fcdad0abd55ece6910b257b8585363823332b026 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 15:26:45 +0100 Subject: [PATCH 02/55] Add workflow to update README with best runs --- .github/workflows/update_readme.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/update_readme.yml diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml new file mode 100644 index 00000000..4845fb89 --- /dev/null +++ b/.github/workflows/update_readme.yml @@ -0,0 +1,24 @@ +name: Update README with best runs +on: + push: + branches: + - test + +jobs: + update_readme: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Extract content from best_runs.md + run: | + sed -n '//, //p' results/best_runs.md > extracted_content.md + + - name: Update README + run: | + # Remove existing content between markers + sed -i '//,//d' README.md + + # Insert new content between markers + sed -i -e '//r extracted_content.md' README.md \ No newline at end of file From c901f470a48ab57b606fd055e2e6407664f347da Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 15:27:32 +0100 Subject: [PATCH 03/55] Add test source code to test.ipynb --- notebooks/test.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/notebooks/test.ipynb b/notebooks/test.ipynb index efc04479..c34d0d13 100644 --- a/notebooks/test.ipynb +++ b/notebooks/test.ipynb @@ -1061,7 +1061,9 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "test" + ] } ], "metadata": { From ce428aab642f0f1d93f47a87c463e9a14639742a Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 15:30:15 +0100 Subject: [PATCH 04/55] Update README with extracted content --- .github/workflows/update_readme.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 4845fb89..3ebd3c9a 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -15,10 +15,16 @@ jobs: run: | sed -n '//, //p' results/best_runs.md > extracted_content.md + - name: Read README.md + id: readme_content + run: | + cat README.md + echo "::set-output name=content::$(cat README.md)" + - name: Update README run: | - # Remove existing content between markers - sed -i '//,//d' README.md - - # Insert new content between markers - sed -i -e '//r extracted_content.md' README.md \ No newline at end of file + # Extract existing content between markers + existing_content=$(echo "${{ steps.readme_content.outputs.content }}" | sed -n '//, //p') + + # Replace existing content with extracted content from best_runs.md + sed -i "s@${existing_content}@$(cat extracted_content.md)@" README.md From 9592b046eeb389f8be5094b73ad55fac5eb6021e Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 15:31:20 +0100 Subject: [PATCH 05/55] Update branch name in GitHub workflow --- .github/workflows/update_readme.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 3ebd3c9a..38227ca1 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -2,7 +2,7 @@ name: Update README with best runs on: push: branches: - - test + - main jobs: update_readme: @@ -18,7 +18,6 @@ jobs: - name: Read README.md id: readme_content run: | - cat README.md echo "::set-output name=content::$(cat README.md)" - name: Update README @@ -27,4 +26,8 @@ jobs: existing_content=$(echo "${{ steps.readme_content.outputs.content }}" | sed -n '//, //p') # Replace existing content with extracted content from best_runs.md - sed -i "s@${existing_content}@$(cat extracted_content.md)@" README.md + new_content=$(cat extracted_content.md) + updated_content=$(echo "${{ steps.readme_content.outputs.content }}" | sed "s@${existing_content}@${new_content}@") + + # Write updated content back to README.md + echo "${updated_content}" > README.md From a500861f201e46c75bf121ff94d136267e5c62c7 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 15:31:54 +0100 Subject: [PATCH 06/55] Update branch for triggering workflow --- .github/workflows/update_readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 38227ca1..4484eead 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -2,7 +2,7 @@ name: Update README with best runs on: push: branches: - - main + - test jobs: update_readme: From 6dd490cd6db1945482010576d394ff97da2f2706 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 15:33:13 +0100 Subject: [PATCH 07/55] Update README with new content --- .github/workflows/update_readme.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 4484eead..6b308979 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -22,12 +22,14 @@ jobs: - name: Update README run: | - # Extract existing content between markers - existing_content=$(echo "${{ steps.readme_content.outputs.content }}" | sed -n '//, //p') + # Read existing content from README.md + existing_content="${{ steps.readme_content.outputs.content }}" - # Replace existing content with extracted content from best_runs.md - new_content=$(cat extracted_content.md) - updated_content=$(echo "${{ steps.readme_content.outputs.content }}" | sed "s@${existing_content}@${new_content}@") + # Read new content from extracted_content.md + new_content="$(cat extracted_content.md)" + + # Replace existing content between markers with new content + updated_content="${existing_content/*/\\${new_content}\\}" # Write updated content back to README.md echo "${updated_content}" > README.md From 9dcf2f07ad8fe73d695283a54dee990712d690cb Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:18:09 +0100 Subject: [PATCH 08/55] Update workflow to use latest version of actions/checkout and improve content extraction --- .github/workflows/update_readme.yml | 30 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 6b308979..759cd491 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -9,27 +9,29 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Update to the latest version - name: Extract content from best_runs.md + id: extract_best_runs # Add an 'id' for later referencing run: | - sed -n '//, //p' results/best_runs.md > extracted_content.md - - - name: Read README.md - id: readme_content - run: | - echo "::set-output name=content::$(cat README.md)" + sed -n '//, //p' results/best_runs.md > extracted_content.md - name: Update README run: | - # Read existing content from README.md - existing_content="${{ steps.readme_content.outputs.content }}" - # Read new content from extracted_content.md new_content="$(cat extracted_content.md)" - # Replace existing content between markers with new content - updated_content="${existing_content/*/\\${new_content}\\}" + # Update content only if there were changes + if [[ -n "${new_content}" ]]; then + # Replace existing section with new content + sed -i '//,//c\\n'"${new_content}"'\n' README.md - # Write updated content back to README.md - echo "${updated_content}" > README.md + # Commit changes to README.md + git config user.name "GitHub Actions Bot" + git config user.email "github-actions-bot@users.noreply.github.com" + git add README.md + git commit -m "Automatic update: Best runs section" + git push + else + echo "No changes in best_runs.md; update skipped" + fi \ No newline at end of file From e2ea94c6ddee978f8e37312307bec3cc7243da32 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:19:57 +0100 Subject: [PATCH 09/55] Update README with new content --- .github/workflows/update_readme.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 759cd491..1c2b208d 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -18,17 +18,15 @@ jobs: - name: Update README run: | - # Read new content from extracted_content.md new_content="$(cat extracted_content.md)" - # Update content only if there were changes if [[ -n "${new_content}" ]]; then # Replace existing section with new content sed -i '//,//c\\n'"${new_content}"'\n' README.md # Commit changes to README.md - git config user.name "GitHub Actions Bot" - git config user.email "github-actions-bot@users.noreply.github.com" + git config user.name "Md Mijanur Rahman" + git config user.email "md.rahman.ce@gmail.com" git add README.md git commit -m "Automatic update: Best runs section" git push From 44c9aa7b1a220f545aee23e70d97067ce6516437 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:22:12 +0100 Subject: [PATCH 10/55] Fix sed command in update_readme.yml --- .github/workflows/update_readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 1c2b208d..529b021a 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -14,7 +14,7 @@ jobs: - name: Extract content from best_runs.md id: extract_best_runs # Add an 'id' for later referencing run: | - sed -n '//, //p' results/best_runs.md > extracted_content.md + sed -n '//,//p' results/best_runs.md > extracted_content.md - name: Update README run: | From 45855c560617d124183218d9617b5d82f5b3cc3a Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:23:38 +0100 Subject: [PATCH 11/55] Update content extraction in update_readme.yml --- .github/workflows/update_readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 529b021a..5ca1cdab 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -14,7 +14,7 @@ jobs: - name: Extract content from best_runs.md id: extract_best_runs # Add an 'id' for later referencing run: | - sed -n '//,//p' results/best_runs.md > extracted_content.md + awk '/## Best Runs/{flag=1; next} /##/{flag=0} flag' best_runs.md > extracted_content.md - name: Update README run: | From f3ce7ad4abc54c433177717f83e00242c2d77b50 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:27:31 +0100 Subject: [PATCH 12/55] Update path in workflow to extract content from results/best_runs.md --- .github/workflows/update_readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 5ca1cdab..605eaae4 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -14,7 +14,7 @@ jobs: - name: Extract content from best_runs.md id: extract_best_runs # Add an 'id' for later referencing run: | - awk '/## Best Runs/{flag=1; next} /##/{flag=0} flag' best_runs.md > extracted_content.md + awk '/## Best Runs/{flag=1; next} /##/{flag=0} flag' results/best_runs.md > extracted_content.md - name: Update README run: | From 5e43c1531b389c63d707b6084dc682fc487bbed0 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:30:30 +0100 Subject: [PATCH 13/55] Update content between markers in README.md --- .github/workflows/update_readme.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 605eaae4..22e768ac 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -21,8 +21,8 @@ jobs: new_content="$(cat extracted_content.md)" if [[ -n "${new_content}" ]]; then - # Replace existing section with new content - sed -i '//,//c\\n'"${new_content}"'\n' README.md + # Replace content between markers with new content + updated_content="${existing_content/*/\\${new_content}\\}" # Commit changes to README.md git config user.name "Md Mijanur Rahman" From d0daf820c431f045d21c556a5effead9d76733e9 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:32:29 +0100 Subject: [PATCH 14/55] Fix bug in login functionality --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 988053a7..69eca652 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ We use the classification models available in [tsai library](https://timeseriesa You can find the results in the following table: - +ngfsoifjkljnlk From d61f5670639ceddcbadd0111eba13ecd9c1823ed Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:35:06 +0100 Subject: [PATCH 15/55] Update README content extraction --- .github/workflows/update_readme.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 22e768ac..7a9ea619 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -11,14 +11,14 @@ jobs: - name: Checkout code uses: actions/checkout@v3 # Update to the latest version - - name: Extract content from best_runs.md - id: extract_best_runs # Add an 'id' for later referencing - run: | - awk '/## Best Runs/{flag=1; next} /##/{flag=0} flag' results/best_runs.md > extracted_content.md + # - name: Extract content from best_runs.md + # id: extract_best_runs # Add an 'id' for later referencing + # run: | + # cat best_runs.md | sed -n '//,//p' | sed '1d;$d' > extracted_content.md - name: Update README run: | - new_content="$(cat extracted_content.md)" + new_content="$(cat results/best_runs.md)" if [[ -n "${new_content}" ]]; then # Replace content between markers with new content From b60ccae289e5a3582c5cb928872e5b6ba45b6921 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:43:08 +0100 Subject: [PATCH 16/55] Update README with best runs --- .github/workflows/update_readme.yml | 46 +++++++++++++---------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 7a9ea619..17da757c 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -1,35 +1,29 @@ -name: Update README with best runs +name: Update README + on: - push: - branches: - - test + push: + branches: + - test jobs: update_readme: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 # Update to the latest version + runs-on: ubuntu-latest # Use an Ubuntu environment - # - name: Extract content from best_runs.md - # id: extract_best_runs # Add an 'id' for later referencing - # run: | - # cat best_runs.md | sed -n '//,//p' | sed '1d;$d' > extracted_content.md + steps: + - uses: actions/checkout@v3 # Check out the code - - name: Update README + - name: Update README.md run: | - new_content="$(cat results/best_runs.md)" + # Read the contents of best_runs.md + best_runs_content=$(cat results/best_runs.md) - if [[ -n "${new_content}" ]]; then - # Replace content between markers with new content - updated_content="${existing_content/*/\\${new_content}\\}" + # Replace the section in README.md (using delimiter to handle special characters) + sed -i '//,//c\\ + '"$best_runs_content"' + \' README.md - # Commit changes to README.md - git config user.name "Md Mijanur Rahman" - git config user.email "md.rahman.ce@gmail.com" - git add README.md - git commit -m "Automatic update: Best runs section" - git push - else - echo "No changes in best_runs.md; update skipped" - fi \ No newline at end of file + # Commit and push the updated README.md + git config --global user.email "md.rahman.ce@gmail.com" + git config --global user.name "Md Mijanur Rahman" + git commit -m "Automatic README update" README.md + git push \ No newline at end of file From fb3f2a8a5721fede01591eccd420703408a0b55c Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:46:12 +0100 Subject: [PATCH 17/55] Update best runs in README.md --- .github/workflows/update_readme.yml | 52 +++++++++++++++++------------ 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 17da757c..bb0697d6 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -1,29 +1,39 @@ -name: Update README +name: Update Best Runs on: - push: - branches: - - test + push: + branches: + - test # Change this to your main branch name if different jobs: - update_readme: - runs-on: ubuntu-latest # Use an Ubuntu environment - + update_best_runs: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 # Check out the code - + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Read Best Runs Content + id: read_best_runs + run: | + # Read the content of best_runs.md file + content=$(cat results/best_runs.md) + echo "::set-output name=content::$content" + - name: Update README.md run: | - # Read the contents of best_runs.md - best_runs_content=$(cat results/best_runs.md) - - # Replace the section in README.md (using delimiter to handle special characters) - sed -i '//,//c\\ - '"$best_runs_content"' - \' README.md - - # Commit and push the updated README.md - git config --global user.email "md.rahman.ce@gmail.com" + # Read the content of README.md + readme_content=$(cat README.md) + + # Replace content between and + new_content="\n$(echo "${{ steps.read_best_runs.outputs.content }}")\n" + updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") + + # Update README.md + echo "$updated_readme_content" > README.md + + # Commit and push changes git config --global user.name "Md Mijanur Rahman" - git commit -m "Automatic README update" README.md - git push \ No newline at end of file + git config --global user.email "md.rahman.ce@gmail.com" + git add README.md + git commit -m "Update best runs in README.md" + git push From 5e701354a9bcf90b4fadebaa91715aa9259ee851 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 20:49:06 +0000 Subject: [PATCH 18/55] Update best runs in README.md --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 69eca652..3c96aa0f 100644 --- a/README.md +++ b/README.md @@ -54,12 +54,9 @@ We use the classification models available in [tsai library](https://timeseriesa You can find the results in the following table: -ngfsoifjkljnlk +| Dataset | GRU_FCN | LSTM | LSTM_FCN | ## Authors * [**Md Mijanur Rahman**](https://github.com/mijanr) - - - From 2ea0bbd8ad8b7d87da70d6d837a9247562057311 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:54:02 +0100 Subject: [PATCH 19/55] Update best runs section in README.md --- .github/workflows/update_readme.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index bb0697d6..cde22a91 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -25,7 +25,9 @@ jobs: readme_content=$(cat README.md) # Replace content between and - new_content="\n$(echo "${{ steps.read_best_runs.outputs.content }}")\n" + #new_content="\n$(echo "${{ steps.read_best_runs.outputs.content }}")\n" + new_content="\n${{ steps.read_best_runs.outputs.content }}\n" + updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") # Update README.md From 3048bee70c2044a93ce1f07ae317e50151dd8f8e Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:56:21 +0100 Subject: [PATCH 20/55] Update content between best_runs sections in README.md --- .github/workflows/update_readme.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index cde22a91..4ce51e83 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -25,7 +25,6 @@ jobs: readme_content=$(cat README.md) # Replace content between and - #new_content="\n$(echo "${{ steps.read_best_runs.outputs.content }}")\n" new_content="\n${{ steps.read_best_runs.outputs.content }}\n" updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") From 29852e14d8d54ebd6e8c4d8bb04714cc7840c11d Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:58:36 +0100 Subject: [PATCH 21/55] Update workflow to print content of best_runs.md file --- .github/workflows/update_readme.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 4ce51e83..0e5e0a19 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -17,7 +17,8 @@ jobs: run: | # Read the content of best_runs.md file content=$(cat results/best_runs.md) - echo "::set-output name=content::$content" + #print the content + echo "$content" - name: Update README.md run: | From 3e9b64af86cae9b06b7ae6778dbc788b76cbf3be Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 20:58:50 +0000 Subject: [PATCH 22/55] Update best runs in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c96aa0f..a55d73a7 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ We use the classification models available in [tsai library](https://timeseriesa You can find the results in the following table: -| Dataset | GRU_FCN | LSTM | LSTM_FCN | + From 6323985df17ba6f352ababa4a53e03516c012dea Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:07:30 +0100 Subject: [PATCH 23/55] Update best runs section in README.md --- .github/workflows/update_readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 0e5e0a19..2f4e9fa6 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -26,7 +26,7 @@ jobs: readme_content=$(cat README.md) # Replace content between and - new_content="\n${{ steps.read_best_runs.outputs.content }}\n" + new_content=" \n $content \n " updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") From 5aa20e75c43a3081a47f7c8d3b90c30e25efd7f5 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:07:48 +0000 Subject: [PATCH 24/55] Update best runs in README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a55d73a7..a78a571f 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,9 @@ We use the classification models available in [tsai library](https://timeseriesa ## Results You can find the results in the following table: - - - + + + ## Authors From 94a9dbd552a98bcdc4d28617308a16b93fa3d31d Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:09:07 +0100 Subject: [PATCH 25/55] Update best runs section in README.md --- .github/workflows/update_readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 2f4e9fa6..be79e1d5 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -28,7 +28,7 @@ jobs: # Replace content between and new_content=" \n $content \n " - updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") + updated_readme_content=$(echo "$readme_content" | sed -e "s/.*/$new_content/g") # Update README.md echo "$updated_readme_content" > README.md From 5f13c91403c9e27abf44c67459c4e3326508a092 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:11:39 +0100 Subject: [PATCH 26/55] Update best runs in README.md --- .github/workflows/update_readme.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index be79e1d5..4546a55a 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -26,16 +26,21 @@ jobs: readme_content=$(cat README.md) # Replace content between and - new_content=" \n $content \n " + new_content="\n${{ steps.read_best_runs.outputs.content }}\n" - updated_readme_content=$(echo "$readme_content" | sed -e "s/.*/$new_content/g") + updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") # Update README.md echo "$updated_readme_content" > README.md - - # Commit and push changes - git config --global user.name "Md Mijanur Rahman" - git config --global user.email "md.rahman.ce@gmail.com" - git add README.md - git commit -m "Update best runs in README.md" - git push + + # make commit if changes are there + if [ "$readme_content" != "$updated_readme_content" ]; then + echo "Committing the changes..." + git config --global user.name "Md Mijanur Rahman" + git config --global user.email " + git add README.md + git commit -m "Update best runs in README.md" + git push + else + echo "No changes in README.md. So, No commit" + fi \ No newline at end of file From c428778fb81280fec2949a39fdbf96b17dd94c46 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:14:13 +0100 Subject: [PATCH 27/55] Refactor code for improved performance --- .github/workflows/update_readme.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 4546a55a..3023ee14 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -26,21 +26,20 @@ jobs: readme_content=$(cat README.md) # Replace content between and - new_content="\n${{ steps.read_best_runs.outputs.content }}\n" - + new_content=" \n $content \n " updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") # Update README.md echo "$updated_readme_content" > README.md - - # make commit if changes are there - if [ "$readme_content" != "$updated_readme_content" ]; then - echo "Committing the changes..." + + # commit the changes if there are any changes + if [ -n "$(git status --porcelain)" ]; then + # Commit and push changes git config --global user.name "Md Mijanur Rahman" - git config --global user.email " + git config --global user.email "md.rahman.ce@gmail.com" git add README.md git commit -m "Update best runs in README.md" git push else - echo "No changes in README.md. So, No commit" + echo "There are no changes in the README.md file" fi \ No newline at end of file From 8eef6b8a61e1f05eddba276d8241fa83afcbad22 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:15:26 +0100 Subject: [PATCH 28/55] Fix typo in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a78a571f..aa84922a 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ We use the classification models available in [tsai library](https://timeseriesa You can find the results in the following table: - + s;fgjwpofjwepj From 0176919bc0491f2a8db42b4b39979a6c7df07b78 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:15:40 +0000 Subject: [PATCH 29/55] Update best runs in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa84922a..a78a571f 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ We use the classification models available in [tsai library](https://timeseriesa You can find the results in the following table: - s;fgjwpofjwepj + From 7912b3c782355fbbe839258fd5de308ca0ab8653 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:17:50 +0100 Subject: [PATCH 30/55] Update best runs in README.md --- .github/workflows/update_readme.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 3023ee14..85104927 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -17,8 +17,7 @@ jobs: run: | # Read the content of best_runs.md file content=$(cat results/best_runs.md) - #print the content - echo "$content" + echo "$content" - name: Update README.md run: | @@ -26,20 +25,20 @@ jobs: readme_content=$(cat README.md) # Replace content between and - new_content=" \n $content \n " + new_content="\n$content\n" updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") # Update README.md echo "$updated_readme_content" > README.md - # commit the changes if there are any changes - if [ -n "$(git status --porcelain)" ]; then - # Commit and push changes - git config --global user.name "Md Mijanur Rahman" - git config --global user.email "md.rahman.ce@gmail.com" - git add README.md - git commit -m "Update best runs in README.md" - git push - else - echo "There are no changes in the README.md file" - fi \ No newline at end of file + # Check if there are changes in README.md + if ! git diff --quiet README.md; then + # Commit and push changes + git config --global user.name "Md Mijanur Rahman" + git config --global user.email "md.rahman.ce@gmail.com" + git add README.md + git commit -m "Update best runs in README.md" + git push + else + echo "There are no changes in the README.md file" + fi From b9472ee5f6980974b17c2dad8041ee4ff8f35c7f Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:18:04 +0000 Subject: [PATCH 31/55] Update best runs in README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a78a571f..a55d73a7 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,9 @@ We use the classification models available in [tsai library](https://timeseriesa ## Results You can find the results in the following table: - - - + + + ## Authors From 6c2eb95a06516dc44a1d09866a1e58aa01eb6080 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:21:00 +0100 Subject: [PATCH 32/55] Update best_runs content in README.md --- .github/workflows/update_readme.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 85104927..135394e7 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -17,6 +17,7 @@ jobs: run: | # Read the content of best_runs.md file content=$(cat results/best_runs.md) + echo "Content from best_runs.md:" echo "$content" - name: Update README.md @@ -26,7 +27,13 @@ jobs: # Replace content between and new_content="\n$content\n" + echo "New content for README.md:" + echo "$new_content" + + # Perform content replacement using sed updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") + echo "Updated README.md content:" + echo "$updated_readme_content" # Update README.md echo "$updated_readme_content" > README.md From 125185fb8648120507788fcf692936152172eada Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:25:32 +0100 Subject: [PATCH 33/55] Update README.md with best_runs content --- .github/workflows/update_readme.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 135394e7..76f3f7f7 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -17,7 +17,6 @@ jobs: run: | # Read the content of best_runs.md file content=$(cat results/best_runs.md) - echo "Content from best_runs.md:" echo "$content" - name: Update README.md @@ -25,16 +24,9 @@ jobs: # Read the content of README.md readme_content=$(cat README.md) - # Replace content between and - new_content="\n$content\n" - echo "New content for README.md:" - echo "$new_content" - - # Perform content replacement using sed - updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") - echo "Updated README.md content:" - echo "$updated_readme_content" - + # add the content of best_runs.md to README.md at line number 57 + updated_readme_content=$(awk -v best_runs_content="${{ steps.read_best_runs.outputs.content }}" 'NR==57{print best_runs_content}1' README.md) + # Update README.md echo "$updated_readme_content" > README.md From f493a06be69d29a5b770b3a373f53df9f6b63dd3 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:25:46 +0000 Subject: [PATCH 34/55] Update best runs in README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a55d73a7..e50cacf7 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ You can find the results in the following table: + From 3fa15831e93da90fe6ca35d3b4bd9fde5b06bd89 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:27:35 +0100 Subject: [PATCH 35/55] Update README.md with best_runs content --- .github/workflows/update_readme.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 76f3f7f7..2f646f13 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -17,6 +17,7 @@ jobs: run: | # Read the content of best_runs.md file content=$(cat results/best_runs.md) + echo "Content from best_runs.md:" echo "$content" - name: Update README.md @@ -24,9 +25,15 @@ jobs: # Read the content of README.md readme_content=$(cat README.md) - # add the content of best_runs.md to README.md at line number 57 - updated_readme_content=$(awk -v best_runs_content="${{ steps.read_best_runs.outputs.content }}" 'NR==57{print best_runs_content}1' README.md) - + # Define line number to insert content (line 57 in this case) + line_number=57 + + # Replace content between and + new_content="\n$content\n" + + # Insert new content at the specified line number + updated_readme_content=$(awk -v content="$new_content" -v line="$line_number" 'NR == line {print content} {print}' README.md) + # Update README.md echo "$updated_readme_content" > README.md From 80be09521e109f0d484dee8468351be07fd5b3a9 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:27:48 +0000 Subject: [PATCH 36/55] Update best runs in README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index e50cacf7..e9cf5f70 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,9 @@ We use the classification models available in [tsai library](https://timeseriesa You can find the results in the following table: + + + From 3ed539ef204ff83a6074ac88dd005b7d8c6354d9 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:29:34 +0100 Subject: [PATCH 37/55] Update README.md with new content at line 57 --- .github/workflows/update_readme.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 2f646f13..3f746025 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -25,14 +25,8 @@ jobs: # Read the content of README.md readme_content=$(cat README.md) - # Define line number to insert content (line 57 in this case) - line_number=57 - - # Replace content between and - new_content="\n$content\n" - - # Insert new content at the specified line number - updated_readme_content=$(awk -v content="$new_content" -v line="$line_number" 'NR == line {print content} {print}' README.md) + # Insert new content at line 57 + updated_readme_content=$(awk -v content="$content" 'NR == 57 {print content} {print}' README.md) # Update README.md echo "$updated_readme_content" > README.md From 22a7f067042e83a30885b114facd414d477a75bc Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:29:48 +0000 Subject: [PATCH 38/55] Update best runs in README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e9cf5f70..0e860a00 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ We use the classification models available in [tsai library](https://timeseriesa You can find the results in the following table: + From 509a55d189e60654e777a3fdd8d028efd9b0f0aa Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:32:38 +0100 Subject: [PATCH 39/55] Remove duplicate section in README.md --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 0e860a00..a55d73a7 100644 --- a/README.md +++ b/README.md @@ -55,11 +55,6 @@ You can find the results in the following table: - - - - - From a69538ff4b1bc74ff8410257d887dddcdb8fab2c Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:32:52 +0100 Subject: [PATCH 40/55] Refactor code to improve performance and readability --- .github/workflows/update_readme.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 3f746025..85104927 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -17,7 +17,6 @@ jobs: run: | # Read the content of best_runs.md file content=$(cat results/best_runs.md) - echo "Content from best_runs.md:" echo "$content" - name: Update README.md @@ -25,8 +24,9 @@ jobs: # Read the content of README.md readme_content=$(cat README.md) - # Insert new content at line 57 - updated_readme_content=$(awk -v content="$content" 'NR == 57 {print content} {print}' README.md) + # Replace content between and + new_content="\n$content\n" + updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") # Update README.md echo "$updated_readme_content" > README.md From d01dbcb7d0f4c3a0b5a11a34e2e4d107538f4e22 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:35:20 +0100 Subject: [PATCH 41/55] Update content between best_runs section in README.md --- .github/workflows/update_readme.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 85104927..eedff418 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -25,11 +25,8 @@ jobs: readme_content=$(cat README.md) # Replace content between and - new_content="\n$content\n" - updated_readme_content=$(echo "$readme_content" | sed -e '//, //c\'"$new_content") - - # Update README.md - echo "$updated_readme_content" > README.md + sed -i '//, //c\'"\n$content\n" README.md + # Check if there are changes in README.md if ! git diff --quiet README.md; then From 983e02a2b77659a454bc0848582b7b39102744cb Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:36:30 +0100 Subject: [PATCH 42/55] Update README with best runs content --- .github/workflows/update_readme.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index eedff418..d49cb8ac 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -24,6 +24,8 @@ jobs: # Read the content of README.md readme_content=$(cat README.md) + echo "Readme Content: $readme_content" + # Replace content between and sed -i '//, //c\'"\n$content\n" README.md From 75f7acffa1a536a8c59980fb07b2af3e236a8f5b Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:42:25 +0100 Subject: [PATCH 43/55] Update results table in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a55d73a7..6467ac46 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,9 @@ We use the classification models available in [tsai library](https://timeseriesa ## Results You can find the results in the following table: - + - + ## Authors From 484d13443f760682cd1696a15d30651f56c9776d Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:42:30 +0100 Subject: [PATCH 44/55] Update best_runs content in README.md --- .github/workflows/update_readme.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index d49cb8ac..b0bb845e 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -25,10 +25,9 @@ jobs: readme_content=$(cat README.md) echo "Readme Content: $readme_content" - - # Replace content between and - sed -i '//, //c\'"\n$content\n" README.md - + + # Replace content between and with best_runs.md content + sed -i -e "//, //c\\n$readme_content\n" README.md # Check if there are changes in README.md if ! git diff --quiet README.md; then From 903687a780e03ed015bb710ac0a439b08f42557b Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:45:46 +0100 Subject: [PATCH 45/55] Add best runs content to README.md --- .github/workflows/update_readme.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index b0bb845e..a48e13ef 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -24,10 +24,8 @@ jobs: # Read the content of README.md readme_content=$(cat README.md) - echo "Readme Content: $readme_content" - - # Replace content between and with best_runs.md content - sed -i -e "//, //c\\n$readme_content\n" README.md + #add the best runs content to the README.md at the end of the file + echo "$readme_content" >> README.md # Check if there are changes in README.md if ! git diff --quiet README.md; then From ed3734730094780471e8fe8d389f85d90c19b0ee Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:46:00 +0000 Subject: [PATCH 46/55] Update best runs in README.md --- README.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/README.md b/README.md index 6467ac46..ecf21b24 100644 --- a/README.md +++ b/README.md @@ -58,5 +58,67 @@ You can find the results in the following table: +## Authors +* [**Md Mijanur Rahman**](https://github.com/mijanr) +# This repository contains the code for time-series (TS) classification with various state-of-the-art TS classification models. + +Entire pipeline is developed in a way such that an easy integration of ***mlflow***, ***hydra*** and ***optuna sweeper*** is possible. + +1. The simplest way to run a model on a specific dataset is to run the following command in the terminal, in the root directory of the repository: +```bash +python main.py +``` +This will run a model on a dataset specified in the config file `main_config.yaml`, located in the `config` directory. + +2. To optimize hyperparameters of a model, run the following command in the terminal, in the root directory of the repository: +```bash +python main.py --multirun +``` +This will run a model on a dataset specified in the config file `main_config.yaml`, located in the `config` directory. However, this time, a search space, specified in `config/search_space/model_name` will be used by optuna to find the optimal hyperparameters. A total number of trial is specified in the `main_config.yaml` file. + +3. To run a model on a specific dataset, run the following command in the terminal, in the root directory of the repository: +```bash +python main.py "dataset_name=[Handwriting]" +``` +For a multirun case: +```bash +python main.py --multirun "dataset_name=[Handwriting]" +``` +To run for a specific model: +```bash +python main.py --multirun "dataset_name=[Handwriting]" "models=LSTM_FCN" +``` +Model name can be anything that is available in the `codes/models` directory, given corresponding configs are also available. + +Similarly, other parameters can also be specified in the terminal, and passed as arguments. +## Mlruns +All the runs are stored in the `mlruns` directory. To visualize the runs, run the following command in the terminal, in the root directory of the repository: +```bash +mlflow ui +``` +This will start a server, and the runs can be visualized in the browser at `localhost:5000`. + +## Requirements +requirements.yml file contains all the dependencies required to run the code. To install all the dependencies, run the following command in the terminal, given that anaconda is installed: +```bash +conda env create -f requirements.yaml +``` +This will create a conda environment named `ts_cl` with all the dependencies installed. +It insall Pytorch with CPU support. To install Pytorch with GPU support, follow the instructions given [here](https://pytorch.org/get-started/locally/). + +## Datasets +This repository uses the datasets from the [UEA & UCR Time Series Classification Repository](https://www.timeseriesclassification.com/). The datasets are automatically downloaded and stored in the `data` directory. + +## Models +We use the classification models available in [tsai library](https://timeseriesai.github.io/tsai/). Models can be added to this repository by adding the corresponding config file in the `config` directory, and the corresponding model file in the `codes/models` directory. + +## Results +You can find the results in the following table: + + + + + + ## Authors * [**Md Mijanur Rahman**](https://github.com/mijanr) From 603e403cab058018ae589b99e9e3273be7b4beb7 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:48:28 +0100 Subject: [PATCH 47/55] Update workflow to read best_runs.md and append its content to README.md --- .github/workflows/update_readme.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index a48e13ef..07953baf 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -16,8 +16,8 @@ jobs: id: read_best_runs run: | # Read the content of best_runs.md file - content=$(cat results/best_runs.md) - echo "$content" + best_run_content=$(cat results/best_runs.md) + echo "$best_run_content" - name: Update README.md run: | @@ -25,7 +25,7 @@ jobs: readme_content=$(cat README.md) #add the best runs content to the README.md at the end of the file - echo "$readme_content" >> README.md + echo "$best_run_content" >> README.md # Check if there are changes in README.md if ! git diff --quiet README.md; then From b41cefa2d3e5ef116a8c11d87569ba51bcb3c0f5 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:48:41 +0000 Subject: [PATCH 48/55] Update best runs in README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ecf21b24..352984b5 100644 --- a/README.md +++ b/README.md @@ -122,3 +122,4 @@ You can find the results in the following table: ## Authors * [**Md Mijanur Rahman**](https://github.com/mijanr) + From ddcb03266bc640cba041ebb09af80ecce6cb218d Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:49:51 +0100 Subject: [PATCH 49/55] Update Authors section in README.md --- README.md | 65 +------------------------------------------------------ 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/README.md b/README.md index 352984b5..bb30d70e 100644 --- a/README.md +++ b/README.md @@ -59,67 +59,4 @@ You can find the results in the following table: ## Authors -* [**Md Mijanur Rahman**](https://github.com/mijanr) -# This repository contains the code for time-series (TS) classification with various state-of-the-art TS classification models. - -Entire pipeline is developed in a way such that an easy integration of ***mlflow***, ***hydra*** and ***optuna sweeper*** is possible. - -1. The simplest way to run a model on a specific dataset is to run the following command in the terminal, in the root directory of the repository: -```bash -python main.py -``` -This will run a model on a dataset specified in the config file `main_config.yaml`, located in the `config` directory. - -2. To optimize hyperparameters of a model, run the following command in the terminal, in the root directory of the repository: -```bash -python main.py --multirun -``` -This will run a model on a dataset specified in the config file `main_config.yaml`, located in the `config` directory. However, this time, a search space, specified in `config/search_space/model_name` will be used by optuna to find the optimal hyperparameters. A total number of trial is specified in the `main_config.yaml` file. - -3. To run a model on a specific dataset, run the following command in the terminal, in the root directory of the repository: -```bash -python main.py "dataset_name=[Handwriting]" -``` -For a multirun case: -```bash -python main.py --multirun "dataset_name=[Handwriting]" -``` -To run for a specific model: -```bash -python main.py --multirun "dataset_name=[Handwriting]" "models=LSTM_FCN" -``` -Model name can be anything that is available in the `codes/models` directory, given corresponding configs are also available. - -Similarly, other parameters can also be specified in the terminal, and passed as arguments. -## Mlruns -All the runs are stored in the `mlruns` directory. To visualize the runs, run the following command in the terminal, in the root directory of the repository: -```bash -mlflow ui -``` -This will start a server, and the runs can be visualized in the browser at `localhost:5000`. - -## Requirements -requirements.yml file contains all the dependencies required to run the code. To install all the dependencies, run the following command in the terminal, given that anaconda is installed: -```bash -conda env create -f requirements.yaml -``` -This will create a conda environment named `ts_cl` with all the dependencies installed. -It insall Pytorch with CPU support. To install Pytorch with GPU support, follow the instructions given [here](https://pytorch.org/get-started/locally/). - -## Datasets -This repository uses the datasets from the [UEA & UCR Time Series Classification Repository](https://www.timeseriesclassification.com/). The datasets are automatically downloaded and stored in the `data` directory. - -## Models -We use the classification models available in [tsai library](https://timeseriesai.github.io/tsai/). Models can be added to this repository by adding the corresponding config file in the `config` directory, and the corresponding model file in the `codes/models` directory. - -## Results -You can find the results in the following table: - - - - - - -## Authors -* [**Md Mijanur Rahman**](https://github.com/mijanr) - +* [**Md Mijanur Rahman**](https://github.com/mijanr) \ No newline at end of file From 54d06e10220a46218c72196bf24fbece7edccb32 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:50:04 +0000 Subject: [PATCH 50/55] Update best runs in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bb30d70e..6467ac46 100644 --- a/README.md +++ b/README.md @@ -59,4 +59,4 @@ You can find the results in the following table: ## Authors -* [**Md Mijanur Rahman**](https://github.com/mijanr) \ No newline at end of file +* [**Md Mijanur Rahman**](https://github.com/mijanr) From ab5a1b0c4f3a3b6b7c0073e81e18a3bce3df0745 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:56:57 +0100 Subject: [PATCH 51/55] Update README with test results --- .github/workflows/update_readme.yml | 45 ++++++++++------------------- 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 07953baf..6f716393 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -1,40 +1,27 @@ -name: Update Best Runs +name: Update README on: push: branches: - - test # Change this to your main branch name if different + - test jobs: - update_best_runs: + update-readme: runs-on: ubuntu-latest + steps: - - name: Checkout Repository + - name: Checkout repository uses: actions/checkout@v2 - - - name: Read Best Runs Content - id: read_best_runs + + - name: Replace results in README run: | - # Read the content of best_runs.md file - best_run_content=$(cat results/best_runs.md) - echo "$best_run_content" - - - name: Update README.md + results=$(cat results/best_runs.md) + sed -i '//, //c\'"$results"'' README.md + + - name: Commit and push if it changed run: | - # Read the content of README.md - readme_content=$(cat README.md) - - #add the best runs content to the README.md at the end of the file - echo "$best_run_content" >> README.md - - # Check if there are changes in README.md - if ! git diff --quiet README.md; then - # Commit and push changes - git config --global user.name "Md Mijanur Rahman" - git config --global user.email "md.rahman.ce@gmail.com" - git add README.md - git commit -m "Update best runs in README.md" - git push - else - echo "There are no changes in the README.md file" - fi + git diff + git config --global user.email "md.rahman.ce@gmail.com" + git config --global user.name "Md Mijanur Rahman" + git commit -am "Update README with test results" || exit 0 + git push \ No newline at end of file From 53960b702a3f4247888e321a8bdd9ebc9b81b5f3 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 22:59:27 +0100 Subject: [PATCH 52/55] Update README with best run results --- .github/workflows/update_readme.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml index 6f716393..e5e4d876 100644 --- a/.github/workflows/update_readme.yml +++ b/.github/workflows/update_readme.yml @@ -14,9 +14,12 @@ jobs: uses: actions/checkout@v2 - name: Replace results in README + # run: | + # results=$(cat results/best_runs.md) + # sed -i '//, //c\'"$results"'' README.md run: | results=$(cat results/best_runs.md) - sed -i '//, //c\'"$results"'' README.md + awk -v r="$results" '// {print; print r; f=1} // {f=0} !f' README.md > temp && mv temp README.md - name: Commit and push if it changed run: | From bbd89552c624f68470b5c464908d7dafd613800e Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 21:59:43 +0000 Subject: [PATCH 53/55] Update README with test results --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6467ac46..c0a65bef 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,12 @@ We use the classification models available in [tsai library](https://timeseriesa You can find the results in the following table: - +| Dataset | GRU_FCN | LSTM | LSTM_FCN | +|:----------------------|----------:|-----------:|-----------:| +| ECG200 | 0.91 | nan | 0.92 | +| HandMovementDirection | nan | nan | 0.486486 | +| Handwriting | nan | nan | 0.0752941 | +| ItalyPowerDemand | nan | 0.559767 | 0.910593 | From a55afb2067e81a65e232d7d079e72a6757a2201c Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 23:39:23 +0100 Subject: [PATCH 54/55] Delete update_readme.yml workflow file --- .github/workflows/update_readme.yml | 30 ----------------------------- 1 file changed, 30 deletions(-) delete mode 100644 .github/workflows/update_readme.yml diff --git a/.github/workflows/update_readme.yml b/.github/workflows/update_readme.yml deleted file mode 100644 index e5e4d876..00000000 --- a/.github/workflows/update_readme.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Update README - -on: - push: - branches: - - test - -jobs: - update-readme: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Replace results in README - # run: | - # results=$(cat results/best_runs.md) - # sed -i '//, //c\'"$results"'' README.md - run: | - results=$(cat results/best_runs.md) - awk -v r="$results" '// {print; print r; f=1} // {f=0} !f' README.md > temp && mv temp README.md - - - name: Commit and push if it changed - run: | - git diff - git config --global user.email "md.rahman.ce@gmail.com" - git config --global user.name "Md Mijanur Rahman" - git commit -am "Update README with test results" || exit 0 - git push \ No newline at end of file From 4e2db7446209fd0d482639cb039402524c736769 Mon Sep 17 00:00:00 2001 From: Md Mijanur Rahman Date: Sat, 16 Mar 2024 23:40:11 +0100 Subject: [PATCH 55/55] Delete best_runs.csv and best_runs.html --- results/best_runs.csv | 5 ----- results/best_runs.html | 36 ------------------------------------ 2 files changed, 41 deletions(-) delete mode 100644 results/best_runs.csv delete mode 100644 results/best_runs.html diff --git a/results/best_runs.csv b/results/best_runs.csv deleted file mode 100644 index 4639f201..00000000 --- a/results/best_runs.csv +++ /dev/null @@ -1,5 +0,0 @@ -Dataset,GRU_FCN,LSTM,LSTM_FCN -ECG200,0.91,,0.92 -HandMovementDirection,,,0.4864864864864865 -Handwriting,0.08235294117647059,,0.07529411764705882 -ItalyPowerDemand,,0.5597667638483965,0.9105928085519922 diff --git a/results/best_runs.html b/results/best_runs.html deleted file mode 100644 index e79f9743..00000000 --- a/results/best_runs.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DatasetGRU_FCNLSTMLSTM_FCN
ECG2000.910000NaN0.920000
HandMovementDirectionNaNNaN0.486486
Handwriting0.082353NaN0.075294
ItalyPowerDemandNaN0.5597670.910593
\ No newline at end of file