MolSSI / QCFractal

A distributed compute and database platform for quantum chemistry.
https://molssi.github.io/QCFractal/
BSD 3-Clause "New" or "Revised" License
144 stars 47 forks source link

`FractalClient.query_results` gives dict for query with no use of `include` #674

Closed dotsdl closed 11 months ago

dotsdl commented 3 years ago

Describe the bug

The FractalClient.query_results method advertises that a dict will be returned if include is specified, which corresponds to pulling only some columns from the corresponding tables in the database and returning them via the REST API.

However, for the 'OpenFF Full Optimization Benchmark 1' OptimizationDataset, we observe a dict returned for each result even without specifying include:


client = FractalClient()

optds = client.get_collection("OptimizationDataset", 'OpenFF Full Optimization Benchmark 1')
optds.status()

opt = optds.df['default'].iloc[0]

# asking for the corresponding gradient point calculations gives a list of dicts
results = client.query_results(opt.trajectory)

# asking for a single gradient point calculation also yields a list of dicts (just the one)
result = client.query_results(opt.trajectory[0])

This is unexpected, and it is not clear why this occurs.

dotsdl commented 3 years ago

From discussion with @bennybp, this is due to changes in some QCElemental models since this dataset was created. He has a migration coming soon that will map old keys to the new ones where present in datasets such as this. Will close this issue when this is out.