Skip to content

Commit

Permalink
Merge branch 'main' into docker-pleary
Browse files Browse the repository at this point in the history
  • Loading branch information
pleary committed Oct 31, 2023
2 parents 0c86442 + 57724bc commit 32d05ce
Show file tree
Hide file tree
Showing 18 changed files with 1,405 additions and 421 deletions.
30 changes: 30 additions & 0 deletions export_data.py
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()
Loading

0 comments on commit 32d05ce

Please sign in to comment.