Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated training script for torch prescriptors to allow config #75

Merged
merged 4 commits into from
Mar 22, 2024

Conversation

danyoungday
Copy link
Collaborator

No description provided.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Basic config file similar to the ESP one.

parser.add_argument("--config_path", type=str, required=True)
args = parser.parse_args()
with open(Path(args.config_path), "r", encoding="utf-8") as f:
config = json.load(f)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The only argument we need is a config file. More customizability can come in the subset of data we use, what type of predictor we use, etc. but for now this simple one works

"hidden_size": 16,
"out_size": len(constants.RECO_COLS)}
if "seed_dir" in config["evolution_params"].keys():
config["evolution_params"]["seed_dir"] = Path(config["evolution_params"]["seed_dir"])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Convert seed dir string into Path object here so that we don't have to do it inside the TorchPrescriptor object and can continue assuming that what gets passed in is a Path

@danyoungday danyoungday self-assigned this Mar 19, 2024
@danyoungday danyoungday merged commit d0d3f41 into main Mar 22, 2024
1 check passed
@danyoungday danyoungday deleted the torch-config branch March 22, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants