Tabular: Fix crash when save path is absolute #3288
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
This PR fixes the obvious error so that the below script works, however the current fix is not a good idea long-term, as I have no idea if there will be edge-cases where it fails. I also don't know if it will work when using multiple disk drives in a single process.
The root of the issue is that
StackerEnsembleModel
does something it shouldn't: It has the absolute paths of both itself and its base models stored as variables. Therefore, in order to figure out where the base models are upon loading in a new location, it isn't sufficient to look at the old absolute paths, instead they need to be regenerated based on 1. the old absolute path, 2. the new path.For example:
When loaded from a new location, this can cause issues. It worked in the past except for cross-os loading.
The solution is to either
trainer
deal with this (Ideal, but significant work)Reproducible Example:
Exception:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.