Fixed config.json download to go to user-supplied cache directory
diff --git a/src/transformers/pipelines/__init__.py b/src/transformers/pipelines/__init__.py
index 8ee0137a20b3f..e60035dd5732d 100755
--- a/src/transformers/pipelines/__init__.py
+++ b/src/transformers/pipelines/__init__.py
@@ -782,6 +782,7 @@ def pipeline(
                 _raise_exceptions_for_gated_repo=False,
                 _raise_exceptions_for_missing_entries=False,
                 _raise_exceptions_for_connection_errors=False,
+                cache_dir=model_kwargs.get("cache_dir"),
                 **hub_kwargs,
             )
             hub_kwargs["_commit_hash"] = extract_commit_hash(resolved_config_file, commit_hash)

Before, config.json would end up in the default cache directory. Now everything but version.txt is placed properly, and since it's downloaded when pipeline is imported, fixing that will be more complex.

I ran "pytest --picked"; it generated 3 warnings, none of which seemed to have anything to do with my change.

@Narsil since this is related to pipeline.