-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature offset3 #101
Feature offset3 #101
Conversation
…ecifications, fixed now
…, this time all test merge should be in the right format
Also added first pass version of dividing by N for that number of feature_collections
Fix bug where merge_inferences() was treated like a class rather than a function
🍹
|
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.
This looks great! Just a sprinkling of notes. Should be ready to push with ~5 mins of correction!
@@ -44,6 +44,7 @@ def upgrade() -> None: | |||
session = orm.Session(bind=bind) | |||
|
|||
eez = get_eez_from_url() # geojson.load(open("EEZ_and_HighSeas_20230410.json")) | |||
eez = {"features": []} # noqa |
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.
This line needs to be deleted before Merging
@@ -36,6 +36,7 @@ def upgrade() -> None: | |||
session = orm.Session(bind=bind) | |||
|
|||
iho = get_iho_from_url() | |||
iho = {"features": []} # noqa |
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.
This line needs to be deleted before Merging
@@ -36,6 +36,7 @@ def upgrade() -> None: | |||
session = orm.Session(bind=bind) | |||
|
|||
mpa = get_mpa_from_url() | |||
mpa = {"features": []} # noqa |
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.
This line needs to be deleted before Merging
print(f"Offset 2 offset_group_bounds: {offset_2_group_bounds}") | ||
|
||
print( | ||
f"Original tiles are {len(base_tiles)}, {len(offset_group_bounds)}, {len(offset_2_group_bounds)}" |
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.
offset_group_bounds and offset_2_group_bounds are the wrong variables here.
I think you want offset_tiles_bounds and offset_2_tiles_bounds
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.
Resolving this for next push
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.
Yep, changes made will be reflected in the next push
@@ -407,13 +423,25 @@ async def _orchestrate( | |||
"offset tiles", | |||
) | |||
|
|||
offset_2_tiles_inference = await perform_inference( | |||
offset_2_tiles_bounds, | |||
cloud_run_inference.get_offset_tile_inference, # THIS FUNCTION NEEDS TO BE EDITTED |
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.
Is this comment still correct?
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.
Nope, taking this out for the next push
@@ -523,7 +551,7 @@ async def _orchestrate( | |||
async with db_client.session.begin(): | |||
orchestrator_run.success = True | |||
orchestrator_run.inference_end_time = end_time | |||
|
|||
# XXXC >> reduce num variables to a list of featureCollection, ala the merging approach |
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.
Clean up this comment?
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.
Will do!
- offset_tile_fc: The secondary FeatureCollection to be merged with the primary. | ||
- isolated_conf_multiplier: A multiplier for the confidence of isolated features (default is 1). | ||
- feature_collections: A list of FeatureCollecitons to be merged, a primary and any secondary FeatureCollections | ||
- isolated_conf_multiplier: A multiplier for the confidence of isolated features (default is 1 / len(feature_collections)). |
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.
Delete this line
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.
Will do!
offset_gdf = gpd.GeoDataFrame.from_features( | ||
offset_tile_fc["features"], crs=4326 | ||
gdfs_for_processing = [ | ||
reproject_to_utm( |
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.
Maybe add a comment about the reproject_to_utm() assumption?
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.
Will do!
🍹
|
Updates to feature offsetting