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

Logging textcat breaks on score name cats_score_desc in base_logger.py #4

Open
ceesroele opened this issue Nov 22, 2022 · 1 comment

Comments

@ceesroele
Copy link

ceesroele commented Nov 22, 2022

For textcat the dictionary other_scores contains cats_score_desc which has a description, e.g. "F1 macro", rather than a loss value. When passed on to AIM through the call aim_run.track(loss_value, name=loss_name, context={'type':f'other_scores_{score_name}'}, epoch=epoch, step=step) the normalization of the loss value results in an error.

Solution: add a test for the score name ending in '_desc' in base_logger.py in the method aim_log_step.

if isinstance(other_scores, dict):
    for score_name, loss_value in other_scores.items():
        if not isinstance(loss_value, dict) and not score_name.endswith('_desc'):  # <-- extra condition for _desc
            aim_run.track(loss_value, name=loss_name, context={'type':f'other_scores_{score_name}'}, 
                                     epoch=epoch, step=step)
@SGevorg
Copy link
Member

SGevorg commented Dec 16, 2022

@osoblanco any chance you could take a look at this and help solve it?

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

No branches or pull requests

2 participants