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.
In PR #130 we moved the
data
directory intomorpheus/data
and installed it with the python package. This required changing some of the default CLI arguments from relative paths likedata/labels_nlp.txt
to absolute paths likemorpheus.DATA_DIR/labels_nlp.txt
.To make it easy for the user to see how to change the labels file, we respecified the default argument value in documentation (i.e.
--labels_file=data/labels_nlp.txt
). Now that this needs to be an absolute path, the command in the documentation does not work. Adding absolute paths in the documentation is not feasible since this would require very long paths that would change from machine to machine.Instead, if the user specifies a data file with a relative path, we first check to see if a file exists relative to the current working directory. If it doesnt exist, then we check for a relative file to the current morpheus install. This allows commands from the documentation like:
morpheus run pipeline-nlp --labels_file=data/labels_nlp.txt
to find the correct path. We only choose the fallback value when no other file is found.Related to PR #200