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

added costs as a column to tracking databases #664

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

VictorVerhaert
Copy link
Contributor

@VictorVerhaert VictorVerhaert self-assigned this Nov 19, 2024
@VictorVerhaert VictorVerhaert linked an issue Nov 19, 2024 that may be closed by this pull request
Copy link
Member

@soxofaan soxofaan left a comment

Choose a reason for hiding this comment

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

quick note

openeo/extra/job_management.py Outdated Show resolved Hide resolved
added testing of usage metrics and costs
openeo/rest/_testing.py Outdated Show resolved Hide resolved
@@ -174,6 +174,8 @@ def test_basic(self, tmp_path, job_manager, job_manager_root_dir, sleep_mock):
("job-2022", "finished", "foo"),
]

assert not pd.read_csv(job_db_path)[["cpu", "memory", "duration", "costs"]].isnull().any().any()
Copy link
Member

Choose a reason for hiding this comment

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

this looks quite cryptic. Can't you assert with real values. All values are predictable, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The values are predictable however also well hidden in the _testing.py file (which isn't in the testing folder but still rests under the src of openeo)

# TODO: move to openeo.testing

This is why I chose to simply check that the values are not none.
Would it help to add a comment # check that the columns "cpu", "memory", "duration" and "costs" of finished jobs are not empty or do you prefer to check on the actual values and add a comment referencing where they are defined? (last option does hold the danger that when the _testing.py file is moved this comment won't be updated)

Third option of course would be to immediately move the _testing.py file in this PR

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

Successfully merging this pull request may close these issues.

JobManager: include cost of job in resulting file
2 participants