csensemakers / desci-sense

2 stars 2 forks source link

Add if name condition to script #73

Closed ronentk closed 7 months ago

ronentk commented 7 months ago

@ShaRefOh There should be an

if __name__ == "__main__":

condition before the script https://github.com/csensemakers/desci-sense/blob/256b6c4c912e5503a8a0ff566ebc3d253051567b/desci_sense/evaluation/eval_benchmark_v0.py#L98

(see here for explanation)

And see here for an example https://github.com/csensemakers/desci-sense/blob/256b6c4c912e5503a8a0ff566ebc3d253051567b/scripts/get_wandb_data.py#L84C1-L85C1

ShaRefOh commented 7 months ago

Sure, do you think we will use this script as a module? It does make sense if we want to run some specific checkups

ronentk commented 7 months ago

Not necessarily, but it's just considered good practice when writing python scripts :)