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

Only log relevant config #329

Merged
merged 6 commits into from
Sep 8, 2023
Merged

Conversation

Sinacam
Copy link
Contributor

@Sinacam Sinacam commented Sep 4, 2023

What does this PR do?

Currently, logs.json contains many completely unrelated config items, which is very misleading.
For example, logs from a linear run has

"val_size": 0.2,
"epochs": 10000,
"batch_size": 16,
"optimizer": "adam",
"learning_rate": 0.0001,
"momentum": 0.9,
"lr_scheduler": null,
"patience": 5,
"early_stopping_metric": "P@1",
"init_weight": "kaiming_uniform",
"loss_function": "binary_cross_entropy_with_logits",
"metric_threshold": 0.5,

These items looks reasonable enough that a user may think they are relevant to linear models, which is wrong.
This PR removes all config values that has never been read, which solves this problem.
There are potentially problems with search_params.py because config is serialized when being passed as an argument to other processes. I haven't checked this yet.
search_params.py behaves correctly with this PR as well.

Test CLI & API (bash tests/autotest.sh)

Test APIs used by main.py.

  • Test Pass
    • (Copy and paste the last outputted line here.)
  • Not Applicable (i.e., the PR does not include API changes.)

Check API Document

If any new APIs are added, please check if the description of the APIs is added to API document.

  • API document is updated (linear, nn)
  • Not Applicable (i.e., the PR does not include API changes.)

Test quickstart & API (bash tests/docs/test_changed_document.sh)

If any APIs in quickstarts or tutorials are modified, please run this test to check if the current examples can run correctly after the modified APIs are released.

@Eleven1Liu Eleven1Liu added enhancement New feature or request, or code polishing model/linear labels Sep 5, 2023
Copy link
Collaborator

@Gordon119 Gordon119 left a comment

Choose a reason for hiding this comment

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

Please help change configs at L337 to AttributeDict

@Gordon119 Gordon119 merged commit f325f48 into ASUS-AICS:master Sep 8, 2023
1 check passed
@Eleven1Liu Eleven1Liu deleted the relevant-config branch September 8, 2023 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request, or code polishing model/linear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants