-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into docker-pleary
- Loading branch information
Showing
18 changed files
with
1,405 additions
and
421 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import click | ||
import json | ||
|
||
|
||
@click.command() | ||
@click.option("--exclude-train-photos-path", "-x", multiple=True, | ||
help="Exclude photos that were included in these training sets.") | ||
@click.option("--limit", type=int, show_default=True, default=5000, | ||
help="Number of observations to include.") | ||
@click.option("--standard_set", help="Export the standard set of 18 filtered datasets.") | ||
@click.option("--filename_suffix", type=str, help="String to add to end of filename.") | ||
@click.option("--place_id", type=int, help="Export observations in this place.") | ||
@click.option("--taxon_id", type=int, help="Export observations in this taxon.") | ||
def test(**args): | ||
# some libraries are slow to import, so wait until command is validated and properly invoked | ||
from lib.model_test_data_exporter import ModelTestDataExporter | ||
print("\nArguments:") | ||
print(json.dumps(args, indent=4)) | ||
print("\nInitializing ModelTestDataExporter...\n") | ||
model_test_data_exporter = ModelTestDataExporter(**args) | ||
print("Exporting data...\n") | ||
if "standard_set" in args and args["standard_set"]: | ||
model_test_data_exporter.generate_standard_set() | ||
else: | ||
model_test_data_exporter.generate_from_cmd_args() | ||
print("\nDone\n") | ||
|
||
|
||
if __name__ == "__main__": | ||
test() |
Oops, something went wrong.