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

Rename SimPSFToolkit.py module #128

Merged
merged 10 commits into from
Mar 18, 2024
Merged

Rename SimPSFToolkit.py module #128

merged 10 commits into from
Mar 18, 2024

Conversation

nadamoukaddem
Copy link
Contributor

solves #112
Changes Made:

  • Renamed SimPSFToolkit.py topsf_simulator.py

  • Renamed the class to PSFSimulator

  • Updated all package and class imports throughout the codebase

@nadamoukaddem nadamoukaddem added the enhancement New feature or request label Mar 6, 2024
@nadamoukaddem nadamoukaddem self-assigned this Mar 6, 2024
Copy link
Contributor

@jeipollack jeipollack left a comment

Choose a reason for hiding this comment

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

I am checking the first few changes and noticed that you didn't change references and imports of the new module name: psf_simulator instead calling it PSFSimulator. PSFSimulator is the name of the class not the module.

Can you please go through and make sure module imports, class imports and doc strings are correct?

Make sure you tested that everything works as expected.

Copy link
Contributor

@jeipollack jeipollack left a comment

Choose a reason for hiding this comment

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

There are a few more changes to implement.

src/wf_psf/psf_models/tf_psf_field.py Outdated Show resolved Hide resolved
src/wf_psf/metrics/metrics.py Outdated Show resolved Hide resolved
src/wf_psf/data/training_preprocessing.py Outdated Show resolved Hide resolved
src/wf_psf/psf_models/psf_model_parametric.py Outdated Show resolved Hide resolved
src/wf_psf/psf_models/psf_model_semiparametric.py Outdated Show resolved Hide resolved
@nadamoukaddem
Copy link
Contributor Author

There are a few more changes to implement.

Is it better to make all changes in one commit, or to commit each file separately?

@jeipollack
Copy link
Contributor

jeipollack commented Mar 7, 2024

If you're performing exactly the same change for several files you can do it in one commit. If it's a different type of change then it should go in another commit.

Also, please be sure to review the Workflow which took effect especially when it comes to branch naming conventions (in particular for next time).

@nadamoukaddem
Copy link
Contributor Author

Okay, thank you, Jennifer.
I'll make sure to follow the branch naming conventions next time. The conventions include three cases: Feature, Bug, and Hotfix. For my case, it will be 'enhancement/issue-number/short-description'?

@jeipollack
Copy link
Contributor

Okay, thank you, Jennifer.
I'll make sure to follow the branch naming conventions next time. The conventions include three cases: Feature, Bug, and Hotfix. For my case, it will be 'enhancement/issue-number/short-description'?

No, the names must be from the three categories. Which one would it be then?

@nadamoukaddem
Copy link
Contributor Author

Okay, thank you, Jennifer.
I'll make sure to follow the branch naming conventions next time. The conventions include three cases: Feature, Bug, and Hotfix. For my case, it will be 'enhancement/issue-number/short-description'?

No, the names must be from the three categories. Which one would it be then?

It's not a new feature, so I would say it's more like a bug.

@nadamoukaddem
Copy link
Contributor Author

There are a few more changes to implement.

Changes have been implemented.

@jeipollack
Copy link
Contributor

Thanks for the update. Did you test with runs of training and metrics to ensure no breaking behaviour?

@nadamoukaddem
Copy link
Contributor Author

Thanks for the update. Did you test with runs of training and metrics to ensure no breaking behaviour?

Yes, but there are tests that require a GPU and they are skipped.

@jeipollack
Copy link
Contributor

jeipollack commented Mar 7, 2024

Not unit tests. I meant validation tests. Launch a batch script and make sure everything runs with no errors.

@nadamoukaddem
Copy link
Contributor Author

Not unit tests. I meant validation tests. Launch a batch script and make sure everything runs with no errors.

Okay, I will try testing it with Google Colab because Feynman is undergoing maintenance.

@nadamoukaddem
Copy link
Contributor Author

Not unit tests. I meant validation tests. Launch a batch script and make sure everything runs with no errors.

I tested the code with a few epochs and got the expected output without any errors.

@jeipollack
Copy link
Contributor

Can you share your validation reports?

@nadamoukaddem
Copy link
Contributor Author

wf-psf_renameModule.log

@jeipollack
Copy link
Contributor

You uploaded a single log file of a run. I want to make sure you understand what is meant by validation reports that should be provided. Can you explain more what this run is? What are the outputs you expected?

@nadamoukaddem
Copy link
Contributor Author

You uploaded a single log file of a run. I want to make sure you understand what is meant by validation reports that should be provided. Can you explain more what this run is? What are the outputs you expected?

After renaming the module, I ran WaveDiff. If everything is working correctly, the code should run without errors, and the metrics should have similar logical values as before renaming. The values in the log seem reasonable, but for full assurance, we should compare them to the log from before the renaming.

@jeipollack
Copy link
Contributor

Thanks for this answer. Just a clarification, if you are using the same random seed and configuration for before-the-changes and after-the-changes run the results should be exact, not similar. If they are not exact, it is important to investigate why they are not the same.

@nadamoukaddem
Copy link
Contributor Author

Yes, by 'similar' I meant the same. As you mentioned, if we are using the same random seed. Thanks for the specifics.

@jeipollack
Copy link
Contributor

Similar /= Same.

Are you going to correct your report, so it's clear which run is the before-changes and after-changes runs? If you don't or can't run the validation tests, then you need to do the two runs and provide the corresponding logs.

@nadamoukaddem
Copy link
Contributor Author

the log I provided is after-changes run

@jeipollack
Copy link
Contributor

jeipollack commented Mar 18, 2024

It is difficult as a reviewer to read bits of information across multiple comments. According to the Pull Request template, assignees should provide a summary of their checks in the original post. Thus, it's possible for you to edit it. Again provide a complete report of the validation tests.

Send me a notification when you're done and ready for me to review the Pull Request.

@nadamoukaddem
Copy link
Contributor Author

Copy link
Contributor

@jeipollack jeipollack left a comment

Choose a reason for hiding this comment

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

Thanks for working on this.

@jeipollack jeipollack merged commit d18eb73 into develop Mar 18, 2024
2 checks passed
@jeipollack jeipollack deleted the rename-PSFSimulator branch March 18, 2024 20:19
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