-
Notifications
You must be signed in to change notification settings - Fork 4
Adjustments for large datasets #124
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
Changes from all commits
ad088c9
c876633
555223d
80c703f
4bbbc54
360980d
0d7c0b9
41f625a
d99e88d
71001a2
5259955
3e97ecc
38be163
250bf6a
9dd744e
1914731
374a0c6
cc33818
546587d
26c80c2
df21fb1
0dc171b
d885392
a28a5d7
3c29aed
9e83cd3
b9f8b46
0a6d382
fea27bb
4e2b6a9
603090c
bc5411e
65c28e8
c654ed3
dc57306
f231dde
6412b60
e28fd35
bfeb8bc
44f546c
532f7f3
adf0951
ea58feb
74ad9bd
f89c509
3c1fd35
211ac87
9fd255d
d8a91e0
6d46ae3
6dcce26
43328ab
e118bba
7e00f84
1282ec6
287dacc
79dcc10
54ce4a5
ed7a9d6
c7e05d9
01d415a
3c445c0
5959501
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,3 +34,4 @@ autzen-aligned.tdb/ | |
| .DS_Store | ||
|
|
||
| docs/source/conf.py | ||
| *.code-workspace | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,9 +30,6 @@ | |
| @click.option( | ||
| '--log-dir', default=None, help='Directory for log output', type=str | ||
| ) | ||
| @click.option( | ||
| '--progress', is_flag=True, default=True, type=bool, help='Report progress' | ||
| ) | ||
| @click.option('--workers', type=int, help='Number of workers for Dask') | ||
| @click.option( | ||
| '--threads', type=int, help='Number of threads per worker for Dask' | ||
|
|
@@ -66,7 +63,6 @@ def cli( | |
| database, | ||
| debug, | ||
| log_dir, | ||
| progress, | ||
| dasktype, | ||
| scheduler, | ||
| workers, | ||
|
|
@@ -88,7 +84,6 @@ def cli( | |
| tdb_dir=database, | ||
| log=log, | ||
| debug=debug, | ||
| progress=progress, | ||
| scheduler=scheduler, | ||
| dasktype=dasktype, | ||
| workers=workers, | ||
|
|
@@ -155,12 +150,15 @@ def info_cmd( | |
|
|
||
| start_date = dates[0] if dates else date | ||
| end_date = dates[1] if dates else date | ||
| if start_date is None and end_date is None: | ||
| info_dates=None | ||
| else: | ||
| info_dates = tuple(start_date, end_date) | ||
|
|
||
| i = info.info( | ||
| app.tdb_dir, | ||
| bounds=bounds, | ||
| start_time=start_date, | ||
| end_time=end_date, | ||
| dates = info_dates, | ||
| name=name, | ||
| concise=True, | ||
| ) | ||
|
|
@@ -175,7 +173,6 @@ def info_cmd( | |
| ] | ||
|
|
||
| i['metadata'].pop('metrics') | ||
| # print(metrics.keys()) | ||
| if any([history, metadata, attributes, metrics]): | ||
| filtered = {} | ||
| if history: | ||
|
|
@@ -187,10 +184,10 @@ def info_cmd( | |
| if metrics: | ||
| filtered['metrics'] = ms | ||
|
|
||
| app.log.info(json.dumps(filtered, indent=2)) | ||
| print(json.dumps(filtered, indent=2)) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are we not capturing to a redirectable log?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The logging function makes using things like |
||
|
|
||
| else: | ||
| app.log.info(json.dumps(i, indent=2)) | ||
| print(json.dumps(i, indent=2)) | ||
| return | ||
|
|
||
|
|
||
|
|
@@ -199,13 +196,6 @@ def info_cmd( | |
| @click.option( | ||
| '--resolution', type=float, default=100, help='Summary pixel resolution' | ||
| ) | ||
| @click.option( | ||
| '--filter_empty', | ||
| is_flag=True, | ||
| type=bool, | ||
| default=False, | ||
| help='Remove empty space in computation. Will take extra time.', | ||
| ) | ||
| @click.option( | ||
| '--point_count', type=int, default=600000, help='Point count threshold.' | ||
| ) | ||
|
|
@@ -215,7 +205,7 @@ def info_cmd( | |
| ) | ||
| @click.pass_obj | ||
| def scan_cmd( | ||
| app, resolution, point_count, pointcloud, bounds, depth, filter_empty | ||
| app, resolution, point_count, pointcloud, bounds, depth | ||
| ): | ||
| """Scan point cloud, output information on it, and determine the optimal | ||
| tile size.""" | ||
|
|
@@ -233,7 +223,6 @@ def scan_cmd( | |
| point_count, | ||
| resolution, | ||
| depth, | ||
| filter_empty, | ||
| log=app.log, | ||
| ) | ||
|
|
||
|
|
@@ -254,9 +243,9 @@ def scan_cmd( | |
| @click.option( | ||
| '--attributes', | ||
| '-a', | ||
| multiple=True, | ||
| type=AttrParamType(), | ||
| help='List of attributes to include in Database', | ||
| default=[], | ||
| help='List of attributes to include in Database, eg. -a Z,Intensity', | ||
| ) | ||
| @click.option( | ||
| '--metrics', | ||
|
|
@@ -268,6 +257,12 @@ def scan_cmd( | |
| @click.option( | ||
| '--resolution', type=float, default=30.0, help='Summary pixel resolution' | ||
| ) | ||
| @click.option( | ||
| '--xsize', type=float, default=1000, help='TileDB X Tile size.' | ||
| ) | ||
| @click.option( | ||
| '--ysize', type=float, default=1000, help='TileDB Y Tile size.' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update help text to tell us size in what units
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was actually a question I meant to ask you about, since these are not referencing units, but the number of cells in X/Y direction to make up a TileDB Tile Extent. I know x/ysize is a bit overloaded, but didn't know what else to call it.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's really a pixel size, right?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it's a TileDB Space Tile for a dense array. Essentially tells TileDB what the size of a working unit is, and tells SilviMetric how to split stuff up for more efficient TileDB IO |
||
| ) | ||
| @click.option( | ||
| '--alignment', | ||
| type=str, | ||
|
|
@@ -283,6 +278,8 @@ def initialize_cmd( | |
| resolution: float, | ||
| metrics: list[Metric], | ||
| alignment: str, | ||
| xsize: int, | ||
| ysize: int | ||
| ): | ||
| """Initialize silvimetrics DATABASE""" | ||
|
|
||
|
|
@@ -295,6 +292,8 @@ def initialize_cmd( | |
| metrics=metrics, | ||
| resolution=resolution, | ||
| alignment=alignment, | ||
| xsize=xsize, | ||
| ysize=ysize | ||
| ) | ||
| return initialize.initialize(storageconfig) | ||
|
|
||
|
|
@@ -376,7 +375,7 @@ def shatter_cmd(app, pointcloud, bounds, report, tilesize, date, dates): | |
| report_path = f'reports/{config.name}.html' | ||
| with performance_report(report_path): | ||
| shatter.shatter(config) | ||
| print(f'Writing report to {report_path}.') | ||
| app.log.debug(f'Writing report to {report_path}.') | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. last time we were changing |
||
| else: | ||
| shatter.shatter(config) | ||
|
|
||
|
|
@@ -385,10 +384,9 @@ def shatter_cmd(app, pointcloud, bounds, report, tilesize, date, dates): | |
| @click.option( | ||
| '--attributes', | ||
| '-a', | ||
| multiple=True, | ||
| type=AttrParamType(), | ||
| default=[], | ||
| help='List of attributes to include output', | ||
| help='List of attributes to include output, eg -a Z,Intensity', | ||
| ) | ||
| @click.option( | ||
| '--metrics', | ||
|
|
@@ -414,15 +412,13 @@ def shatter_cmd(app, pointcloud, bounds, report, tilesize, date, dates): | |
| def extract_cmd(app, attributes, metrics, outdir, bounds): | ||
| """Extract silvimetric metrics from DATABASE""" | ||
|
|
||
| # TODO only allow metrics and attributes to be added if they're present | ||
| # in the storage config. | ||
| # dask_handle( | ||
| # app.dasktype, | ||
| # app.scheduler, | ||
| # app.workers, | ||
| # app.threads, | ||
| # app.watch, | ||
| # ) | ||
| dask_handle( | ||
| app.dasktype, | ||
| app.scheduler, | ||
| app.workers, | ||
| app.threads, | ||
| app.watch, | ||
| ) | ||
|
|
||
| config = ExtractConfig( | ||
| tdb_dir=app.tdb_dir, | ||
|
|
@@ -445,7 +441,7 @@ def extract_cmd(app, attributes, metrics, outdir, bounds): | |
| ) | ||
| @click.pass_obj | ||
| def delete_cmd(app, task_id): | ||
| manage.delete(tdb_dir=app.tdb_dir, name=task_id, log=app.log) | ||
| manage.delete(storage=app.tdb_dir, name=task_id, log=app.log) | ||
|
|
||
|
|
||
| @cli.command('restart') | ||
|
|
@@ -458,7 +454,7 @@ def delete_cmd(app, task_id): | |
| ) | ||
| @click.pass_obj | ||
| def restart_cmd(app, task_id): | ||
| manage.restart(tdb_dir=app.tdb_dir, name=task_id, log=app.log) | ||
| manage.restart(storage=app.tdb_dir, name=task_id, log=app.log) | ||
|
|
||
|
|
||
| @cli.command('resume') | ||
|
|
@@ -471,7 +467,7 @@ def restart_cmd(app, task_id): | |
| ) | ||
| @click.pass_obj | ||
| def resume_cmd(app, task_id): | ||
| manage.resume(tdb_dir=app.tdb_dir, name=task_id, log=app.log) | ||
| manage.resume(storage=app.tdb_dir, name=task_id, log=app.log) | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.