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

Data Generation Separation for Gridsearch #35

Closed
wants to merge 20 commits into from
Closed

Data Generation Separation for Gridsearch #35

wants to merge 20 commits into from

Conversation

yb6599
Copy link
Collaborator

@yb6599 yb6599 commented Aug 27, 2024

This PR introduces data generation separation for gridsearch experiments.

Copy link
Owner

@Jacob-Stevens-Haas Jacob-Stevens-Haas left a comment

Choose a reason for hiding this comment

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

Hey Yash, thanks for separating out data generation! First round of review:

  1. This is too much stuff not related to separating data generation. Let's work on just PRing a single piece of functionality.
  2. It's helpful to describe the API changes in the PR comment.
  3. ...as well as some simple command that demonstrates the change. Have you tried this with a MockExperiment?
  4. I assume data_prep is its own experiment step, right? Maybe a better approach would have been better accepting merely sim_params and letting gridsearch decide when to generate new simulation data. Let's chat about approach tomorrow.

@@ -16,6 +16,15 @@
logger = logging.getLogger(__name__)


class PDEData(dict):

Choose a reason for hiding this comment

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

Suggested change
class PDEData(dict):
class PDEData(TypedDict):

(requires importing TypedDict from typing

dt=time_args[0],
t_end=time_args[1],
)
rel_noise = sim_params["rel_noise"]

Choose a reason for hiding this comment

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

Why are rel_noise and t_end given such special treatment?

len(spatial_grid),
]
if grid_params is not None:
start_time = process_time()

Choose a reason for hiding this comment

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

the you can move calls to process_time() outside the conditional so we can remove redundant lines of code

Comment on lines +156 to +157
t_end = combo[0]
rel_noise = combo[1]

Choose a reason for hiding this comment

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

What about other simulation parameters?

def run(
seed: float,
data: dict,

Choose a reason for hiding this comment

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

Need a more complete type information for data

@yb6599 yb6599 closed this Sep 28, 2024
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