Skip to content

Commit

Permalink
fixed issue of 'model_repo_id' being hard-coded and updated pipeline-…
Browse files Browse the repository at this point in the history
…card link to online html renderer url
  • Loading branch information
aurelienmorgan committed Jan 6, 2025
1 parent e8a26d2 commit 4db51ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@


def _model_readme_params(
model_repo_id: str,
base_model_dict: dict,
training_dataset_dict: dict,
version_label: str,
Expand Down Expand Up @@ -92,6 +93,7 @@ def _model_readme_params(
)

return {
"model_repo_id": model_repo_id,
"new_version_label": version_label,
"commit_datetime": commit_datetime,

Expand Down Expand Up @@ -125,6 +127,7 @@ def _model_readme_params(
def get_model_readme_content(
template_folder: str,

model_repo_id: str,
base_model_dict: dict,
training_dataset_dict: dict,

Expand All @@ -147,6 +150,7 @@ def get_model_readme_content(
Params:
- template_folder (str)
- model_repo_id (str)
- base_model_dict (dict)
- repo_id
- commit_hash
Expand All @@ -170,6 +174,7 @@ def get_model_readme_content(
"""

params = _model_readme_params(
model_repo_id=model_repo_id,
base_model_dict=base_model_dict,
training_dataset_dict=training_dataset_dict,
version_label=version_label,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ model-index:
`version {{ new_version_label }}` - `{{ commit_datetime.strftime("%Y-%m-%d %H:%M:%S UTC") }}`
(retraining
<a target="_blank"
href="https://huggingface.co/retrain-pipelines/function_caller/tree/retrain-pipelines_source-code/v{{ new_version_label }}_{{ timestamp_str }}">source-code</a> |
href="https://huggingface.co/{{ model_repo_id }}/tree/retrain-pipelines_source-code/v{{ new_version_label }}_{{ timestamp_str }}">source-code</a> |
<a target="_blank"
href="https://huggingface.co/retrain-pipelines/function_caller/tree/retrain-pipelines_pipeline-card/v{{ new_version_label }}_{{ timestamp_str }}">pipeline-card</a>)
href="https://huggingface.co/spaces/retrain-pipelines/online_pipeline_card_renderer/?model_repo_id={{ }}&version_id=v{{ new_version_label }}_{{ timestamp_str }}">pipeline-card</a>)

Training dataset&nbsp;:
- <code>{{ dataset_repo_id }} v{{ dataset_version_label }}</code>
Expand Down

0 comments on commit 4db51ec

Please sign in to comment.