Skip to content

add example for srfit parallel - #57

Closed
chiahaoliu wants to merge 1 commit into
diffpy:mainfrom
chiahaoliu:test_parallel
Closed

add example for srfit parallel#57
chiahaoliu wants to merge 1 commit into
diffpy:mainfrom
chiahaoliu:test_parallel

Conversation

@chiahaoliu

Copy link
Copy Markdown
Member

@pavoljuhas This PR is just for the ease of sharing my test on this behavior, please feel free to close if needed.

Main result from this test:

==== Rw before refinements ====
0.26614659070837554
==== Rw: Sequencial refinements ====
0.12266949912726588
0.12266949912726588
0.12266949912726588
0.12266949912726588
0.12266949912726588
==== Rw: Parallel refinements ====
0.4096894020385561
0.4096894020385561
0.4096894020385561
0.4096894020385561
0.4096894020385561

for recipe in recipe_list:
recipe = fit_wrapper(recipe)
res = FitResults(recipe)
print(res.rw)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

sequential test here

rv = p.map(fit_wrapper, recipe_list)
for recipe in rv:
res = FitResults(recipe)
print(res.rw)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

running in parallel

recipe.clearFitHooks()
res = FitResults(recipe)
print(res.rw)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

print rw before refinement

@codecov

codecovBot commented Mar 21, 2019

Copy link
Copy Markdown

Codecov Report

Merging #57 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@## master #57 +/- ##
=======================================
Coverage 81.14% 81.14% =======================================
Files 91 91 Lines 7577 7577 =======================================
Hits 6148 6148 Misses 1429 1429

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90d1e5d...e1f78e8. Read the comment docs.

@cadenmyers13

Copy link
Copy Markdown
Contributor

@sbillinge Can we either merge or close this?

@sbillingesbillinge changed the title add example to test srfit paralleladd example for srfit parallelAug 14, 2026
@sbillinge

Copy link
Copy Markdown
Contributor

This is probably a valuable example. We may want to add it to the diffpy.cmi examples but only after cleaning and removing deprecated functions. @cadenmyers13 how did you move the examples over before? f it is not too much work let's move it over, but just make an issue for now on diffpy.cmi and link this. Leave instructions how to do the move-over and we can give it to a new student at some point. It would be good to close this when it is moved over.

@cadenmyers13

Copy link
Copy Markdown
Contributor

@sbillinge Moving over is no problem. I'll duplicate the work on this PR with the new API. Then I can put it in cmi

@cadenmyers13

cadenmyers13 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@sbillinge this can be closed now. Created this cmi issue diffpy/diffpy.cmi#113

@sbillinge

Copy link
Copy Markdown
Contributor

closing. replaced by diffpy/diffpy.cmi#113

Sign up for freeto 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.

3 participants

@chiahaoliu@cadenmyers13@sbillinge