Skip to content

Conversation

@mattwthompson
Copy link
Member

@mattwthompson mattwthompson commented Nov 4, 2024

Closes #677

@codecov
Copy link

codecov bot commented Jul 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.78%. Comparing base (5443cdf) to head (24ce9fa).
⚠️ Report is 10 commits behind head on main.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mattwthompson mattwthompson marked this pull request as ready for review July 11, 2025 20:42
@j-wags j-wags self-assigned this Jul 15, 2025
@mattwthompson mattwthompson merged commit 0788909 into main Jul 17, 2025
14 checks passed
)

@root_validator
@model_validator(mode="before")
Copy link
Contributor

@lilyminium lilyminium Jul 31, 2025

Choose a reason for hiding this comment

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

FYI, this breaks filtering using the CurationWorkflow as seen in https://github.com/openforcefield/openff-sage/blob/a6a061ba8ebc144e3fda46f5f7a9e7a352b9cd2f/data-set-curation/physical-property/optimizations/curate-training-set.py#L103-L173 . Any reason it was set to "before"? "after" works for me.

I think it's because validation is run before the type attribute (Literal) gets a chance to distinguish different classes -- I wind up with errors like the below:

(Ignore the speculation above, I'm tired and not thinking clearly.)

2025-07-31 16:45:18,828 - __main__ - INFO - Starting at Thu Jul 31 16:45:18 2025
2025-07-31 16:45:34,560 - __main__ - INFO - Loading 9216 data
Traceback (most recent call last):
  File "/Users/lily/pydev/ash-sage-rc2/01_download-data/physprop/final/filter-data-training.py", line 264, in <module>
    main()
  File "/Users/lily/micromamba/envs/evaluator-050/lib/python3.11/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lily/micromamba/envs/evaluator-050/lib/python3.11/site-packages/click/core.py", line 1363, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/lily/micromamba/envs/evaluator-050/lib/python3.11/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lily/micromamba/envs/evaluator-050/lib/python3.11/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lily/pydev/ash-sage-rc2/01_download-data/physprop/final/filter-data-training.py", line 239, in main
    training_set_frame = curate_data_set(
                         ^^^^^^^^^^^^^^^^
  File "/Users/lily/pydev/ash-sage-rc2/01_download-data/physprop/final/filter-data-training.py", line 161, in curate_data_set
    curation_schema = CurationWorkflowSchema(
                      ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lily/micromamba/envs/evaluator-050/lib/python3.11/site-packages/pydantic/main.py", line 253, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lily/pydev/openff-evaluator/openff/evaluator/datasets/curation/components/filtering.py", line 798, in _validate_mutually_exclusive
    smirks_to_include = values.get("smirks_to_include")
                        ^^^^^^^^^^
  File "/Users/lily/micromamba/envs/evaluator-050/lib/python3.11/site-packages/pydantic/main.py", line 989, in __getattr__
    raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')
AttributeError: 'FilterByEnvironmentsSchema' object has no attribute 'get'

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.

Use Pydantic V2 API

4 participants