Sweep when each experiment consists on 2 trains?

Hi! I need to create a sweep where, for each run I actually need the script to run 2 separate training processes, as I need to pre-train some modules (one call to train.py) and then I need to train the actual model using the pre-trained parts (another call to train.py)
Is there a way of doing this?
Thanks!

Hi @arcmle, thanks for your question! If I’m understanding you properly, this should be doable by specifying these instructions inside the function you’re passing to the agent like:

def main():
  pretrained_model = train()
  final_model = train(pretrained_model)
wandb.agent(id, function=main, count=1)

Please let me know if this would work for you and feel free to ask any questions!

Hi arcmle,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

Best,
Luis

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.