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

Caching behavior in ConcatenateJob #481

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Caching behavior in ConcatenateJob #481

merged 2 commits into from
Jan 29, 2024

Conversation

vieting
Copy link
Contributor

@vieting vieting commented Jan 25, 2024

The ConcatenateJob has currently hard-coded caching behavior.

gs.file_caching(str(i)) for i in self.text_files

In a case where I wanted to concatenate feature cache bundle files, this is suboptimal because caching the bundle (I think it's determined via the ending ".bundle") means caching all files inside that. That (a) takes unnecessarily long because we don't need to cache the content files and (b) - more importantly - is also wrong because the concatenated output file will contain the cached paths starting with /var/tmp/.

I used Path objects and set cached=False. The proposed change results in the intended behavior. Should we keep the compatibility for string inputs?

Also, I refactored the init function a bit.

@Atticus1806
Copy link
Contributor

In general I would consider dropping string inputs generally. But since this would break potentially a lot, I would prefer to keep it in. But I really like the approach of not having it as a type.

@vieting
Copy link
Contributor Author

vieting commented Jan 29, 2024

In general I would consider dropping string inputs generally. But since this would break potentially a lot, I would prefer to keep it in. But I really like the approach of not having it as a type.

I also thought about this but was afraid that it breaks things, too. So I decided not to tackle that issue here.

@vieting vieting merged commit add09a8 into main Jan 29, 2024
4 checks passed
@vieting vieting deleted the peter_concatenate branch January 29, 2024 09:43
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