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

Bnb/ddh norm #180

Merged
merged 4 commits into from
Nov 27, 2023
Merged

Bnb/ddh norm #180

merged 4 commits into from
Nov 27, 2023

Conversation

bnb32
Copy link
Collaborator

@bnb32 bnb32 commented Nov 27, 2023

No description provided.

Copy link
Member

@grantbuster grantbuster left a comment

Choose a reason for hiding this comment

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

Might have a few negative tests fail that i added recently, i can handle them if you want.

else:
with ThreadPoolExecutor(max_workers=max_workers) as exe:
futures = {}
now = dt.now()
for idh, dh in enumerate(self.data_handlers):
future = exe.submit(dh.normalize, self.means, self.stds,
max_workers=1)
max_workers=dh.norm_workers)
Copy link
Member

Choose a reason for hiding this comment

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

Is there a specific reason you would want a worker to spin up more threads within a thread pool? Historically i've been very cautious of this. I don't want my threads/processes to be forking themselves.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that's fair. Makes sense to go back to 1

self._raw_data.pop(t)

def parallel_data_fill(self, shifted_time_chunks, max_workers=None):
def data_fill(self, shifted_time_chunks, max_workers=None):
Copy link
Member

Choose a reason for hiding this comment

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

Not a huge fan of this naming convention. I always find it confusing when there is a .method and a ._method. I think you're trying to hide the serial method from the "public" view but it makes the developer's job more confusing. I'd suggest _single_data_fill() and _data_fill()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I renamed this just bc it includes the serial method also so its not strictly "parallel"

Copy link
Member

Choose a reason for hiding this comment

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

Yeah understood but I think _single*() and _data_fill() would be the most clear, dont you think?

@bnb32 bnb32 merged commit 5fec6f7 into gb/ddh_stats_bug Nov 27, 2023
4 of 8 checks passed
@bnb32 bnb32 deleted the bnb/ddh_norm branch November 27, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants