fix: strip duplicated resolution frame validation#208
Conversation
07129d2 to
b01480b
Compare
|
@houtanb now also fixed polymarket as it was duplicating validation too but I'd also like to ask your advice on whether I should just refactor the semantics of resolution file building altogether - I don't like it anymore. Some sources have both What do you think? |
b01480b to
11e3324
Compare
| @@ -386,14 +386,14 @@ def _build_resolution_file( | |||
|
|
|||
| @staticmethod | |||
| def _finalize_resolution_df(df: pd.DataFrame) -> DataFrame[ResolutionFrame]: | |||
There was a problem hiding this comment.
Should this return pd.DataFrame now that validation has moved to UpdateResult.__post_init__? Currently DataFrame[ResolutionFrame] implies this helper returns a validated schema.
There was a problem hiding this comment.
Same question for:
def _build_resolution_file(
self,
question: dict,
resolved: bool,
existing_df: DataFrame[ResolutionFrame] | None = None,
) -> DataFrame[ResolutionFrame]:There was a problem hiding this comment.
I want to keep the annotation for readability reasons. I appreciate the implicitness of the annotation but it's not decorated with @pa.check_types so validation does not apply.
fixes #206
also happens to fix a dormant deviation for infer: original infer refactor stripped infer's
astype(dtype=constants.RESOLUTION_FILE_COLUMN_DTYPE)when building the resolution frame. Is now corrected and matches manifold/metaculus.Let me know if I should run parity tests for all 3 sources - I will assume not.