Unverified Commit f57b27d2 authored by Dhruv Nair's avatar Dhruv Nair Committed by GitHub
Browse files

Update pipeline test fetcher (#8931)

update
parent c5fdf33a
...@@ -4,7 +4,7 @@ import os ...@@ -4,7 +4,7 @@ import os
from collections import defaultdict from collections import defaultdict
from pathlib import Path from pathlib import Path
from huggingface_hub import HfApi, ModelFilter from huggingface_hub import HfApi
import diffusers import diffusers
...@@ -27,7 +27,6 @@ PIPELINE_USAGE_CUTOFF = int(os.getenv("PIPELINE_USAGE_CUTOFF", 50000)) ...@@ -27,7 +27,6 @@ PIPELINE_USAGE_CUTOFF = int(os.getenv("PIPELINE_USAGE_CUTOFF", 50000))
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
api = HfApi() api = HfApi()
filter = ModelFilter(library="diffusers")
def filter_pipelines(usage_dict, usage_cutoff=10000): def filter_pipelines(usage_dict, usage_cutoff=10000):
...@@ -46,7 +45,7 @@ def filter_pipelines(usage_dict, usage_cutoff=10000): ...@@ -46,7 +45,7 @@ def filter_pipelines(usage_dict, usage_cutoff=10000):
def fetch_pipeline_objects(): def fetch_pipeline_objects():
models = api.list_models(filter=filter) models = api.list_models(library="diffusers")
downloads = defaultdict(int) downloads = defaultdict(int)
for model in models: for model in models:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment