Commit 9de0a67 1 parent e2bcaa3 commit 9de0a67 Copy full SHA for 9de0a67
File tree 4 files changed +45
-6
lines changed
4 files changed +45
-6
lines changed Original file line number Diff line number Diff line change
1
+ from collections import defaultdict
2
+
3
+ from helm .proxy .models import ALL_MODELS
4
+
5
+
6
+ def define_env (env ):
7
+ @env .macro
8
+ def models_by_organization ():
9
+ result = defaultdict (list )
10
+ for model in ALL_MODELS :
11
+ result [model .creator_organization ].append (model )
12
+ if "Simple" in result :
13
+ del result ["Simple" ]
14
+ return result
15
+
16
+ @env .macro
17
+ def render_model_tags (model ):
18
+ return ", " .join ([f"`{ tag } `" for tag in model .tags ])
Original file line number Diff line number Diff line change
1
+ # Models
2
+
3
+ {% for organization, models in models_by_organization().items() %}
4
+
5
+ ## {{ organization }}
6
+
7
+ {% for model in models %}
8
+
9
+ ### {{ model.display_name }}
10
+
11
+ - Name: ` {{ model.name }} `
12
+ - Group: ` {{ model.group }} `
13
+ - Tags: {{ render_model_tags(model) }}
14
+
15
+ {{ model.description }}
16
+
17
+ {% endfor %}
18
+ {% endfor %}
Original file line number Diff line number Diff line change 1
1
mkdocs == 1.4.2
2
2
mkdocstrings [python ]== 0.19.0
3
+ mkdocs-macros-plugin == 0.7.0
Original file line number Diff line number Diff line change 5
5
highlightjs : false
6
6
plugins :
7
7
- search
8
+ - macros :
9
+ module_name : docs/mkdocs_macros
8
10
- mkdocstrings :
9
- handlers :
10
- python :
11
- show_root_heading : true
12
- show_signature_annotations : true
13
- show_bases : false
14
- show_source : false
11
+ handlers :
12
+ python :
13
+ show_root_heading : true
14
+ show_signature_annotations : true
15
+ show_bases : false
16
+ show_source : false
15
17
extra_css :
16
18
- docstrings.css
17
19
markdown_extensions :
You can’t perform that action at this time.
0 commit comments