-
-
Notifications
You must be signed in to change notification settings - Fork 34
Make process improvements #59
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,4 @@ | |
| /data/ | ||
| /dcs-data/ | ||
| *.log | ||
| **/www/env | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,54 +1,76 @@ | ||
| #!/usr/bin/env sh | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Create all of the linguistic data necessary for general usage. | ||
|
|
||
| # Clean up temporary files, if they exist. | ||
| rm -Rf data-git 2&> /dev/null | ||
| rm -Rf dcs-data 2&> /dev/null | ||
|
|
||
| # Exit if any step in this install script fails. | ||
| set -e | ||
|
|
||
| # Clean up temporary files, if they exist. | ||
| rm -rf data-git | ||
| rm -rf dcs-data | ||
|
|
||
| # Create necessary directories. | ||
| mkdir -p "data/build/${1}" | ||
|
|
||
| echo "=========================" | ||
| echo "| DCS corpus data |" | ||
| echo "=========================" | ||
| echo | ||
| if [ -e "data/raw/dcs" ]; then | ||
|
|
||
| echo -e " | ||
| ========================= | ||
| | DCS corpus data | | ||
| ========================= | ||
| " | ||
|
|
||
| if [[ -e "data/raw/dcs" ]]; then | ||
| echo "Training data already exists -- skipping fetch." | ||
| else | ||
| echo "Training data does not exist -- fetching." | ||
|
|
||
| mkdir -p "data/raw/dcs" | ||
| git clone --depth 1 https://github.com/OliverHellwig/sanskrit.git dcs-data | ||
|
|
||
| mv dcs-data/dcs/data/conllu data/raw/dcs/conllu | ||
| rm -Rf dcs-data | ||
| rm -rf dcs-data | ||
| fi | ||
| echo | ||
| echo "=========================" | ||
| echo "| Linguistic data fetch |" | ||
| echo "=========================" | ||
| echo | ||
| if [ -e "data/raw/lex" ]; then | ||
|
|
||
|
|
||
| echo -e " | ||
| ========================= | ||
| | Linguistic data fetch | | ||
| ========================= | ||
| " | ||
|
|
||
| if [[ -e "data/raw/lex" ]]; then | ||
| echo "Lexical data already exists -- skipping fetch." | ||
| else | ||
| echo "Lexical data does not exist -- fetching." | ||
|
|
||
| mkdir -p "data/raw/lex" | ||
| git clone --depth=1 https://github.com/sanskrit/data.git data-git | ||
|
|
||
| python3 data-git/bin/make_data.py --make_prefixed_verbals | ||
| mv data-git/all-data/* data/raw/lex | ||
|
|
||
| rm -rf data-git | ||
| fi | ||
| echo | ||
| echo "=========================" | ||
| echo "| Vidyut build |" | ||
| echo "=========================" | ||
| echo | ||
| make create_kosha | ||
| make test_kosha | ||
| make create_sandhi_rules | ||
| make train_cheda | ||
| make eval_cheda | ||
| echo | ||
| echo "Complete." | ||
|
|
||
|
|
||
| echo -e " | ||
| ========================= | ||
| | Vidyut build | | ||
| ========================= | ||
| " | ||
|
|
||
| if [[ "$1" == "" ]]; then | ||
| make_cmd="make -j`nproc`" | ||
| else | ||
| make_cmd=$1 | ||
| fi | ||
|
|
||
| $make_cmd create_kosha | ||
| $make_cmd test_kosha | ||
| $make_cmd create_sandhi_rules | ||
| $make_cmd train_cheda | ||
| $make_cmd eval_cheda | ||
|
|
||
|
|
||
| echo -e "\nComplete." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that
-jcontrols the number of make recipes that run in parallel. If so, what is the benefit of using-jhere?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cargo can respect the jobserver settings. Refer rust-lang/rust#42682.
Even if the workflow is currently serial, there is a possibility of decoupling steps in future for faster builds.
For instance,
create_koshaexecutes successfully beforecreate_sandhi_rules, so there is no dependency (though the latter is quick). I think the cloning can also be parallelized, by use of recipes like this:So the
create_all_data.shfile really is a bottleneck. There are several make commands there and they execute one by one. Maybe a bit of parallelization will help, like in test/train?