Skip to content

Commit

Permalink
Revert "Adding flavor map to model selector args (#1591)" (#1604)
Browse files Browse the repository at this point in the history
This reverts commit 2a18224.
  • Loading branch information
jpmann authored Oct 31, 2023
1 parent 1834726 commit ba60dfc
Showing 1 changed file with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,26 +247,6 @@ class ModelImportConstants:
}


FLAVOR_MAP = {
# OSS Flavor
"transformers": {
"tokenizer": "components/tokenizer",
"model": "model",
"config": "model"
},
"hftransformersv2": {
"tokenizer": "data/tokenizer",
"model": "data/model",
"config": "data/config"
},
"hftransformers": {
"tokenizer": "data/tokenizer",
"model": "data/model",
"config": "data/config"
}
}


def get_model_asset_id() -> str:
"""Read the model asset id from the run context.
Expand Down Expand Up @@ -441,7 +421,7 @@ def model_selector(args: Namespace):
mlflow_data = yaml.safe_load(fp)
if mlflow_data and "flavors" in mlflow_data:
for key in mlflow_data["flavors"]:
if key in FLAVOR_MAP.keys():
if key in ["hftransformers", "hftransformersv2"]:
for key2 in mlflow_data["flavors"][key]:
if key2 == "generator_config" and args.task_name == "TextGeneration":
generator_config = mlflow_data["flavors"][key]["generator_config"]
Expand Down Expand Up @@ -500,9 +480,6 @@ def main():
azureml_pkg_denylist_logging_patterns=LOGS_TO_BE_FILTERED_IN_APPINSIGHTS,
)

# Adding flavor map to args
setattr(args, "flavor_map", FLAVOR_MAP)

model_selector(args)


Expand Down

0 comments on commit ba60dfc

Please sign in to comment.