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

[BUG/PERFORMANCE] - Handling of logdir: conflict between metrics and trainer #65

Open
EmanueleGhelfi opened this issue May 7, 2020 · 0 comments
Labels
bug Something isn't working todo 🗒️

Comments

@EmanueleGhelfi
Copy link
Contributor

EmanueleGhelfi commented May 7, 2020

The logdir can be defined in trainers and in metrics.

The actual behaviour is to override the metric's logdir using the trainer's logdir.

However, the logdir parameter in trainer is optional and it has a default value (cwd + "log").

logdir = "mylogdir"

precision = ClassifierMetric(
            metric=tf.keras.metrics.Precision(),
            model_selection_operator=operator.gt,
            logdir=logdir,
)

trainer = ClassifierTrainer(
            model=self.model,
            optimizer=optimizer,
            loss=loss,
            epochs=epochs,
            metrics=[precision], 
            callbacks=callbacks,
)
 trainer(
            self.train_dataset.batch(batch_size).prefetch(1),
            self.validation_dataset.batch(batch_size).prefetch(1),
)

Ashpy logs in the directory "log" instead of the directory "mylogdir".

Possible solution: remove logdir from the metric's __init__ and set the logdir from the trainer.

[Optional] remove logdir default values.

@EmanueleGhelfi EmanueleGhelfi added bug Something isn't working todo 🗒️ labels May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working todo 🗒️
Projects
None yet
Development

No branches or pull requests

1 participant