mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-03 18:27:43 +00:00
feat: add loop_n parameter to the main loop (#611)
* add loop_n parameter to main loop * complete the loop_n --------- Co-authored-by: Xu <v-xuminrui@microsoft.com>
This commit is contained in:
@@ -140,7 +140,7 @@ class DataScienceRDLoop(RDLoop):
|
||||
logger.log_object(self.trace.sota_experiment(), tag="SOTA experiment")
|
||||
|
||||
|
||||
def main(path=None, step_n=None, competition="bms-molecular-translation"):
|
||||
def main(path=None, step_n=None, loop_n=None, competition="bms-molecular-translation"):
|
||||
"""
|
||||
|
||||
Parameters
|
||||
@@ -149,6 +149,10 @@ def main(path=None, step_n=None, competition="bms-molecular-translation"):
|
||||
path like `$LOG_PATH/__session__/1/0_propose`. It indicates that we restore the state that after finish the step 0 in loop1
|
||||
step_n :
|
||||
How many steps to run; if None, it will run forever until error or KeyboardInterrupt
|
||||
loop_n :
|
||||
How many loops to run; if None, it will run forever until error or KeyboardInterrupt
|
||||
- if current loop is incomplete, it will be counted as the first loop for completion.
|
||||
- if both step_n and loop_n are provided, the process will stop as soon as either condition is met.
|
||||
competition :
|
||||
|
||||
|
||||
@@ -174,7 +178,7 @@ def main(path=None, step_n=None, competition="bms-molecular-translation"):
|
||||
kaggle_loop = DataScienceRDLoop(DS_RD_SETTING)
|
||||
else:
|
||||
kaggle_loop = DataScienceRDLoop.load(path)
|
||||
kaggle_loop.run(step_n=step_n)
|
||||
kaggle_loop.run(step_n=step_n, loop_n=loop_n)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user