Skip to content

Conversation

@AngledLuffa
Copy link
Collaborator

Parameter for loading transformer & tokenizer with local_files_only

Add local_files_only as a parameter to the FoundationCache, in case that winds up being useful

Copy link
Member

@Jemoka Jemoka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm: are there any foundation cache codepaths which is using foundation cache but not this which could cause versioning problems? otherwise this looks great

self.download_method = normalize_download_method(download_method)
if (self.download_method is DownloadMethod.DOWNLOAD_RESOURCES or
(self.download_method is DownloadMethod.REUSE_RESOURCES and not os.path.exists(os.path.join(self.dir, "resources.json")))):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re slack though: I do think we should we should merge these two options into one

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@AngledLuffa
Copy link
Collaborator Author

lgtm: are there any foundation cache codepaths which is using foundation cache but not this which could cause versioning problems? otherwise this looks great

some of the training methods might, i suppose, in that they'd clobber any previous transformer & model because there's no option to not go to HF

Add local_files_only as a parameter to the FoundationCache, in case that winds up being useful

NONE download_method doesn't download anything, including HF, rather than adding a new mode
@Jemoka
Copy link
Member

Jemoka commented Aug 5, 2024

got it; this new scheme looks good to me!

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