Skip to content

Add getting dataset status by compute tag - #939

Merged
bennybp merged 1 commit into
mainfrom
ds_tag_stat
Apr 30, 2025
Merged

Add getting dataset status by compute tag#939
bennybp merged 1 commit into
mainfrom
ds_tag_stat

Conversation

@bennybp

@bennybp bennybp commented Apr 29, 2025

Copy link
Copy Markdown
Contributor

Description

Adds a function (client & server) to get the status of a dataset grouped by tag.

Tested with some larger datasets on a test server and it seems fast enough (typically less than 3 seconds or so)

(if there's any more, I imagine we should make one general function)

Requested by @jaclark5

Status

  • Code base linted
  • Ready to go

@bennybp
bennybp merged commit d59e782 into main Apr 30, 2025
@bennybp
bennybp deleted the ds_tag_stat branch April 30, 2025 13:23
@jaclark5

jaclark5 commented Apr 30, 2025

Copy link
Copy Markdown

@bennybp This looks great! It seems I can't test it live until it's merged and on the servers?

So it would return something like:

response = [
    ("tag1", "running", 5),
    ("tag1", "waiting", 400),
    ("tag2", "error", 300),
]

Would it be possible for it to return the record ids in each tuple? Either that or could ds.iterate_records() have a keyword for compute_tag?

@bennybp

bennybp commented Apr 30, 2025

Copy link
Copy Markdown
Contributor Author

The former might be better. But do you want record ids or entry/specification strings?

@jaclark5

Copy link
Copy Markdown

Probably the entry/specification since it's faster to search by entries, it just thought record ids would be easier since the former would result in a tuple like (tag, status, count, [(entry1, spec1), (entry2, spec2),....)]).

@bennybp

bennybp commented Apr 30, 2025

Copy link
Copy Markdown
Contributor Author

Record ids are definitely easier on my end. I guess whats missing is a function to get a record by ID from the dataset? Although you can just use the top-level client for that

@jaclark5

jaclark5 commented Apr 30, 2025

Copy link
Copy Markdown

The next step I would want to take with this information is get Molecule properties from the different categories. Having entries would be easiest since it's fast to call those from the dataset. If I had record ids I'd have to call them through the client to get entry names and then call those from the dataset, so entry names and specs are probably better for what I'm looking for.

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.

2 participants