Skip to content
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

Refactor native #74

Merged
merged 5 commits into from
Dec 13, 2024
Merged

Refactor native #74

merged 5 commits into from
Dec 13, 2024

Conversation

relativityhd
Copy link
Collaborator

It should now be much more easy to make changes, since less code repetition. However, understandability is worse now

It should now be much more easy to make changes, since less code repetition.
However, understandability is worse now
@relativityhd relativityhd added the enhancement New feature or request label Nov 26, 2024
@relativityhd relativityhd requested a review from iona5 November 26, 2024 15:10
Copy link
Collaborator

@iona5 iona5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general seeing all those parameters be passed around if it wouldn't be a good idea (dont know if you meant the same) that we had classes or at least a dictionary for the parametrization. eg SegmentationSettings (with patch_size, overlap, batch_size, reflection) and PostprocessSettings (with binarization_threshold, mask_erosion_size, min_object_size, use_quality_mask). But i know your philosophy of classes is different than mine... ;)



"""
data_generator = _load_planet(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats the datacube loader, isn't it? so no vrts and the parameters do not match.



"""
data_generator = _load_s2(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well.

@iona5
Copy link
Collaborator

iona5 commented Nov 27, 2024

but apart from the slow data_loader function missing this is fine by me... :)

@relativityhd
Copy link
Collaborator Author

@iona5 you are right, doing with classes is a way better method here.
I now use a mixin design to reduce duplicated code, which works quite well. However, it felt a lot like writing a Framework, which I don't want to do for this Repo. How do you feel about these changes? Would they fit you? Is the code still understandable?

@relativityhd relativityhd requested a review from iona5 November 29, 2024 20:19
@iona5
Copy link
Collaborator

iona5 commented Dec 3, 2024

First Impression: Seems like a nice way of doing things. :) It feels like the level of modularity is "correct", but i agree one need to become familiar with the structure at first. I don't think it is too complicated though. Will have a further look tomorrow

@relativityhd relativityhd merged commit 81f069b into main Dec 13, 2024
1 check passed
@relativityhd relativityhd deleted the refactor/native-pipes branch December 13, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants