Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions src/Microsoft.ML.AutoML/Experiment/Experiment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,8 @@ private static DirectoryInfo GetModelDirectory(DirectoryInfo rootDir)
{
return null;
}
var subdirs = rootDir.Exists ?
new HashSet<string>(rootDir.EnumerateDirectories().Select(d => d.Name)) :
new HashSet<string>();
string experimentDir;
for (var i = 0; ; i++)
{
experimentDir = $"experiment{i}";
if (!subdirs.Contains(experimentDir))
{
break;
}
}
var experimentDirFullPath = Path.Combine(rootDir.FullName, experimentDir);

var experimentDirFullPath = Path.Combine(rootDir.FullName, Path.GetRandomFileName());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you prefix w/ "experiment_"? The will help users know its purpose.

Suggested change
var experimentDirFullPath = Path.Combine(rootDir.FullName, Path.GetRandomFileName());
var experimentDirFullPath = Path.Combine(rootDir.FullName, "experiment_" + Path.GetRandomFileName());

This creates a path of Temp\Microsoft.ML.AutoML\experiment_w143kxnu.idj\....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @justinormont! Added the prefix.

var experimentDirInfo = new DirectoryInfo(experimentDirFullPath);
if (!experimentDirInfo.Exists)
{
Expand Down