question related to fix issues of merge_artifacts ...
# ask-metaflow
h
question related to fix issues of merge_artifacts I understand merge_artifacts doesn't work perfectly. It sometimes can't merge a property even it's not modified. but I don't want to do
self.a = inputs[0].a
because there are lots of these attributes I want to set. and the code just get tedious. what's a good alternative way here?
s
@hundreds-motorcycle-57551 - are you interested in just extracting artifacts from the first task? depending on your use case, we can help with an example.
h
yes, I am. There are a lot of artifacts (small attributes) I would like to collect from the first task (actually all tasks share the mostly same attributes). an example would be really appreciated.
@square-wire-39606, would you mind helping me on this one? Thanks a lot
s
something like this -
Copy code
first = inputs[0]
    self.first_input_attrs = {k: getattr(first, k) for k in first._datastore}
❤️ 1