from clustertools import ParameterSet, ConstrainedParameterSet, Experiment, set_stdout_logging, CTParser from cli_computation import CliComputationFactory from e2e_classifier_train_maxzoom import main def env_parser(): parser = CTParser() parser.add_argument("--device", dest="device", default="cuda:0") parser.add_argument("--n_jobs", dest="n_jobs", default=1, type=int) return parser if __name__ == "__main__": set_stdout_logging() # Define the parameter set: the domain each variable can take environment, namespace = env_parser().parse() env_params = dict(namespace._get_kwargs()) data_path = "/scratch/users/rmormont/tissuenet" env = {"image_path": os.path.join(data_path, "patches"), "metadata_path": os.path.join(data_path, "metadata"), "model_path": os.path.join(data_path, "models"), "device": namespace.device, "n_jobs": namespace.n_jobs } os.makedirs(env["image_path"], exist_ok=True) os.makedirs(env["metadata_path"], exist_ok=True)
def test_stdout_logging(): set_stdout_logging() assert_true(True) # No exception