Getting full run id

Is there a way to print out the full run id when using guild compare?

I wanted to run through the results and then inspect the folder containing the output of the run in .guild, but the output of guild compare is the shortened run id so I can’t directly find the folder.

Use the -c, --cols option to include the run id attribute this way:

guild compare -c .id

This appends the full ID to the table. The prefix . indicates the name is an a run attribute. If you wanted to indicate a scalar you’d omit the prefix. If you wanted to indicate a flag you’d use = as the prefix.

See Column Specs for more info.

I find for i in {1..X};do guild open --marked --cmd "echo" ${i};done to be more useful than guild compare in this case cause it gives you the full directory.

Out of curiosity, what do you do with these run directories? Do they feed an automated process or are you using them manually to access run files?

I needed to access them manually in this case. I was running a set of experiments and after I started analyzing the results, I realized there were another set of metrics that I wanted to compute. Luckily I had saved the network weights using guild, so I iterated over each run, reloaded the weights, and then computed these additional metrics.

If there is a nicer way to do this I would definitely like to know, but I didn’t think this process was too painful to code up.

If there was also way to save these new metrics to the run folders that would be great, I didn’t look into whether that was possible.

You can use the guild.ipy module to iterate over runs to get their directory.

from guild import ipy

for _, row in ipy.runs().iterrows():
    run = row.run.value
    print("%s: %s" % (run.id, run.dir))

The ipy module is primarily intended for interactive use but it works just as well for scripting like this. You just need Pandas as it uses data frames for the interface.

If you’d prefer not to install Pandas, there’s another API but it’s not officially released for general use. I’m happy to help you with that though - it’s stable and will be released at some point.