Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GCP downloader in example #419

Merged
merged 1 commit into from
Jul 20, 2023
Merged

Conversation

tianshuc
Copy link
Contributor

@tianshuc tianshuc commented Jul 18, 2023

Update examples with our new GCP downloader features.

Code changes from @ajaysaini725

Confirmed it worked:

Downloading model from path: gs://mosaicml-mcloud-tests/sg_test Downloading /tmp/mpt/local_model/checkpoints-1671246524-rare-albatross-ep0-ba12-rank0.pt... Converting model to FT format Traceback (most recent call last): File "/code/inference_go/downloader.py", line 83, in <module> download_func(**model_config.download_parameters) File "/code/examples/examples/inference-deployments/mpt/mpt_ft_handler.py", line 122, in download_convert convert_mpt_to_ft(model_name_or_path, LOCAL_CHECKPOINT_DIR, gpus, File "/code/llm-foundry/scripts/inference/convert_hf_mpt_to_ft.py", line 200, in convert_mpt_to_ft model = transformers.AutoModelForCausalLM.from_pretrained( File "/usr/lib/python3/dist-packages/transformers/models/auto/auto_factory.py", line 441, in from_pretrained config, kwargs = AutoConfig.from_pretrained( File "/usr/lib/python3/dist-packages/transformers/models/auto/configuration_auto.py", line 908, in from_pretrained config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs) File "/usr/lib/python3/dist-packages/transformers/configuration_utils.py", line 573, in get_config_dict config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs) File "/usr/lib/python3/dist-packages/transformers/configuration_utils.py", line 628, in _get_config_dict resolved_config_file = cached_file( File "/usr/lib/python3/dist-packages/transformers/utils/hub.py", line 380, in cached_file raise EnvironmentError( OSError: /tmp/mpt/local_model does not appear to have a file named config.json. Checkout 'https://huggingface.co//tmp/mpt/local_model/None' for available files.

* Make FT handler download from GCP

* lint

* fix lint

---------

Co-authored-by: Jeffrey Chen <jeffrey@mosaicml.com>
@tianshuc tianshuc marked this pull request as ready for review July 20, 2023 21:28
@tianshuc tianshuc changed the title Make FT handler download from GCP (#417) Add GCP downloader in example Jul 20, 2023
@sakshigupta93 sakshigupta93 merged commit d1cd929 into main Jul 20, 2023
21 checks passed
@sakshigupta93 sakshigupta93 deleted the tianshu/gcp-download-example branch July 20, 2023 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants