You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ModelContainer class in the jwst repository attempts to provide its own get_crds_parameters() method (code here), but this is not respected in stpipe. Instead, get_crds_parameters() is read from the first datamodel in the sequence.
This override failure doesn't seem to be breaking anything currently in jwst, and it may not be necessary at all. However, the method itself cannot easily be removed because ModelContainer relies on isinstance(container, AbstractDataModel) returning True to make its way through Step.run, and get_crds_parameters() and crds_observatory are required methods to pass that check.
I see two ways to fix this that are not mutually exclusive, and both could (and perhaps should) be implemented:
Change the logic for finding get_crds_parameters() such that if a Sequence-type input has its own get_crds_parameters() method, that method is used.
Make it so that ModelContainer does not need to satisfy the requirements of an AbstractDataModel in order to pass through Step.run. This change will make sense particularly once this pull request is merged, as it removes the inheritance of ModelContainer from JWSTDataModel. This withdrawn PR provided a (partial?) implementation of this change.
The text was updated successfully, but these errors were encountered:
The ModelContainer class in the jwst repository attempts to provide its own
get_crds_parameters()
method (code here), but this is not respected in stpipe. Instead,get_crds_parameters()
is read from the first datamodel in the sequence.This override failure doesn't seem to be breaking anything currently in jwst, and it may not be necessary at all. However, the method itself cannot easily be removed because ModelContainer relies on
isinstance(container, AbstractDataModel)
returning True to make its way through Step.run, andget_crds_parameters()
andcrds_observatory
are required methods to pass that check.I see two ways to fix this that are not mutually exclusive, and both could (and perhaps should) be implemented:
get_crds_parameters()
such that if a Sequence-type input has its ownget_crds_parameters()
method, that method is used.AbstractDataModel
in order to pass through Step.run. This change will make sense particularly once this pull request is merged, as it removes the inheritance of ModelContainer from JWSTDataModel. This withdrawn PR provided a (partial?) implementation of this change.The text was updated successfully, but these errors were encountered: