LSSTDESC / rail_base

Base classes for RAIL
MIT License
0 stars 1 forks source link

_aliases not exist before assigning tag to it #133

Closed ztq1996 closed 1 month ago

ztq1996 commented 1 month ago

When I run columnmapper, it gives me this. I believe I have encounter this multiple time, a quick fix would be check if _aliases exist, if not, initiate one.

File /hildafs/projects/phy200017p/ztq1996/ztq1996/RAIL/rail_base/src/rail/core/stage.py:291, in RailStage.set_data(self, tag, data, path, do_read)
    289 aliased_tag = data.tag
    290 if tag in self.input_tags():
--> 291     self._aliases[tag] = aliased_tag
    292     if data.has_path:
    293         self._inputs[tag] = data.path

AttributeError: 'ColumnMapper' object has no attribute '_aliases'

Before submitting Please check the following:

eacharles commented 1 month ago

I think that you have some other problem, maybe the wrong version of ceci, or a bad init,

self._aliases is _always made in the PipelineStage c’tor, see here:

https://github.com/LSSTDESC/ceci/blob/f51c74b3503f93ab8d998235358e47fbc85676f6/ceci/stage.py#L98 ceci/ceci/stage.py at f51c74b3503f93ab8d998235358e47fbc85676f6 · LSSTDESC/ceci github.com

On Jul 24, 2024, at 5:06 PM, Tianqing (TQ) Zhang @.***> wrote:

When I run columnmapper, it gives me this. I believe I have encounter this multiple time, a quick fix would be check if _aliases exist, if not, initiate one.

File /hildafs/projects/phy200017p/ztq1996/ztq1996/RAIL/rail_base/src/rail/core/stage.py:291, in RailStage.set_data(self, tag, data, path, do_read) 289 aliased_tag = data.tag 290 if tag in self.input_tags(): --> 291 self._aliases[tag] = aliased_tag 292 if data.has_path: 293 self._inputs[tag] = data.path

AttributeError: 'ColumnMapper' object has no attribute '_aliases' Before submitting Please check the following:

I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem. I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a descriprion of what I expected instead. If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list. — Reply to this email directly, view it on GitHub https://github.com/LSSTDESC/rail_base/issues/133, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADRIGIWQPQK5CWSJPHBEPJLZOA6RRAVCNFSM6AAAAABLNOU2R6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZDQNRXG4ZTCNQ. You are receiving this because you are subscribed to this thread.

eacharles commented 1 month ago

Pretty sure this was fixed with all the ceci updates.