Select Git revision
eval-morph-pred.conllu
-
Carlos Ramisch authoredCarlos Ramisch authored
mupixinfer.py 1.05 KiB
from mupixutils import *
import argparse
import json
import os
def main():
# Create an ArgumentParser object
parser = argparse.ArgumentParser(description='Train µPIX Model')
# Add arguments for the input and output paths
parser.add_argument('--experiment_path', type=str, required=True, help='Path to the experiment folder')
# Parse the arguments
args = parser.parse_args()
# Access the paths and retrain flag from the arguments
experiment_path = args.experiment_path
# Load the JSON file
with open(experiment_path+"/hyperparameters.json", 'r') as file:
config = json.load(file)
batch_size = config["batch_size"]
# Access data paths
test_data_path = config["data_paths"]["test"]
output_path = experiment_path +"/predictions"
# Output for verification
print(f"Output Path: {output_path}")
print("Data loading...")
#### test_dataloading
test_dataloading(test_data_path,experiment_path,batch_size)
print("Data predicted at %s !" %output_path)
if __name__ == "__main__":
main()