AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Sync skill tree to a versioned website (#289)
merwanehamadi1560892c58b1
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 7eca47f467..2db450a9c6 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -122,6 +122,11 @@ jobs:- name: Setup Chrome and ChromeDriverrun: |+ echo "Add submodules"+ cd agbenchmark/challenges+ git submodule update --init --remote --recursive+ cd ../..+sudo apt-get updatesudo apt-get install -y unzip xvfbwget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -@@ -273,6 +278,14 @@ jobs:if git push origin HEAD; thenecho "Success!"poetry run python send_to_googledrive.py || echo "Failed to upload to Google Drive"+ echo "Adding skill_tree submodule to update website"+ poetry run agbenchmark start --mock+ cd agbenchmark/challenges/skill_tree+ git add .+ git commit -m "Update website with new skill tree"+ git remote set-url origin https://x-access-token:${{ env.GH_TOKEN }}@github.com/agbenchmark/skill-tree.github.io.git+ git push origin HEAD:refs/heads/main+ cd ../../..exit 0elseecho "Attempt $(($attempts + 1)) failed. Retrying..."@@ -284,6 +297,8 @@ jobs:env:GDRIVE_BASE64: ${{ secrets.GDRIVE_BASE64 }}GITHUB_REF_NAME: ${{ github.ref_name }}+ BUILD_SKILL_TREE: true+ AGENT_NAME: ${{ matrix.agent-name }}generate_charts:needs: testsdiff --git a/.gitmodules b/.gitmodulesindex de4680ffff..5039aa1823 100644--- a/.gitmodules+++ b/.gitmodules@@ -33,3 +33,7 @@[submodule "agbenchmark/challenges"]path = agbenchmark/challengesurl = https://github.com/agbenchmark/agent-evals.git+[submodule "skill-tree"]+ path = skill-tree+ url = https://github.com/agbenchmark/skill-tree.github.io+ branch = maindiff --git a/agbenchmark/challenges b/agbenchmark/challengesindex 790e540116..949f17d9f9 160000--- a/agbenchmark/challenges+++ b/agbenchmark/challenges@@ -1 +1 @@-Subproject commit 790e54011653bdc1cb80a83483070ec7ff2abf7b+Subproject commit 949f17d9f9f4d0d0cef54654c9fd6f583104c1c3diff --git a/agbenchmark/utils/dependencies/graphs.py b/agbenchmark/utils/dependencies/graphs.pyindex 7445474b7b..241afe9402 100644--- a/agbenchmark/utils/dependencies/graphs.py+++ b/agbenchmark/utils/dependencies/graphs.py@@ -266,7 +266,7 @@ def graph_interactive_network("layout": {"hierarchical": hierarchical_options},}- relative_path = "agbenchmark/challenges/dependencies.html"+ relative_path = "agbenchmark/challenges/skill_tree/dependencies.html"file_path = str(Path(relative_path).resolve())if show:@@ -279,7 +279,7 @@ def graph_interactive_network(]iframe_path = "dependencies.html"- combined_file_path = "agbenchmark/challenges/combined_view.html"+ combined_file_path = "agbenchmark/challenges/skill_tree/combined_view.html"create_combined_html(combined_file_path, iframe_path, table_data)# JavaScript code snippet to be inserted@@ -295,7 +295,7 @@ def graph_interactive_network("""# Path to the iframe HTML file- iframe_path = "agbenchmark/challenges/dependencies.html"+ iframe_path = "agbenchmark/challenges/skill_tree/dependencies.html"# Insert the JS code snippet into the iframe HTML fileinsert_js_into_iframe(iframe_path, iframe_js_code)diff --git a/agbenchmark/utils/dependencies/main.py b/agbenchmark/utils/dependencies/main.pyindex cf09b6c88a..8ec88fb027 100644--- a/agbenchmark/utils/dependencies/main.py+++ b/agbenchmark/utils/dependencies/main.py@@ -7,6 +7,7 @@ __init__.py.import collectionsimport json+import osfrom typing import Any, Generator, Optionalimport colorama@@ -195,6 +196,12 @@ class DependencyManager(object):def sorted_items(self, show_graph: Optional[bool] = False) -> Generator:"""Get a sorted list of tests where all tests are sorted after their dependencies."""# Build a directed graph for sorting+ build_skill_tree = os.getenv("BUILD_SKILL_TREE")+ BUILD_SKILL_TREE = (+ build_skill_tree.lower() == "true" if build_skill_tree else False+ )+ if BUILD_SKILL_TREE:+ show_graph = Truedag = networkx.DiGraph()# Insert all items as nodes, to prevent items that have no dependencies and are not dependencies themselves from