@@ -171,6 +171,9 @@ def main(base: Path, task: str):
171171 elif task == "Taxonomy_Kingdom" :
172172 config = {"name" : "Taxonomy_Kingdom" , "task" : "classification" , "num_classes" : 13 }
173173 metrics = get_metrics ("multilabel" , n_outputs = 13 )
174+ elif task == "spectrum" :
175+ config = {"name" : "Spectrum" , "task" : "regression" , "num_classes" : 2048 }
176+ metrics = get_metrics ("regression" , n_outputs = 2048 )
174177 else :
175178 raise ValueError (f"Unknown task { task } " )
176179
@@ -202,7 +205,7 @@ def main(base: Path, task: str):
202205 scheduler ,
203206 metrics ,
204207 datamodule ,
205- num_epochs = 100 ,
208+ num_epochs = 2 ,
206209 padding = False
207210 )
208211 torch .save (model .state_dict (), version / "model.pth" )
@@ -211,6 +214,6 @@ def main(base: Path, task: str):
211214if __name__ == "__main__" :
212215 parser = argparse .ArgumentParser ()
213216 parser .add_argument ("--base" , type = Path , required = True )
214- parser .add_argument ("--task" , type = str , required = True , choices = ["glycosylation" , "tissue" , "Taxonomy_Kingdom" ])
217+ parser .add_argument ("--task" , type = str , required = True , choices = ["glycosylation" , "tissue" , "Taxonomy_Kingdom" , "spectrum" ])
215218 args = parser .parse_args ()
216219 main (args .base , args .task )
0 commit comments