Skip to content

Integrates mag-net-hub fork with magnet ui-intro.py models#125

Open
ehavugi wants to merge 3 commits intoPrincetonUniversity:mainfrom
ehavugi:main
Open

Integrates mag-net-hub fork with magnet ui-intro.py models#125
ehavugi wants to merge 3 commits intoPrincetonUniversity:mainfrom
ehavugi:main

Conversation

@ehavugi
Copy link
Copy Markdown
Contributor

@ehavugi ehavugi commented Jul 14, 2025

Integrates mag-net-hub fork with magnet ui-intro.py models

related upb-lea/mag-net-hub#1
Key changes upsampling 128 to 1024 points

 for material_test in material_list:
            if model in mag_net_hub_models:
                mdl = mh.loss.LossModel(material=material_test, team=model)
                loss_test, hdata_test = mdl(resample(bdata,1024), freq, temp)
                loss_test=np.round(loss_test,2)
            else:
                hdata_test = BH_Transformer(material_test, freq, temp, bias, bdata)
                loss_test = loss_BH(bdata, hdata_test, freq)

For the displayed H, currently the magnet(princeton) H prediction is not overrided due to possibility of not having H in a mag-net-hub model.

@ehavugi
Copy link
Copy Markdown
Contributor Author

ehavugi commented Jul 14, 2025

MagNet Platform

@wkirgsn
Copy link
Copy Markdown
Collaborator

wkirgsn commented Jul 15, 2025

Hi, I would like to let you know that it is perfectly fine to feed sequences shorter or longer than 1024 samples into any magnet-toolkit/mag-net-hub model. There is implicit resampling in the call to the toolkit built-in.

@ehavugi
Copy link
Copy Markdown
Contributor Author

ehavugi commented Jul 15, 2025

Removed the resampling

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