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
Is your feature request related to a problem? Please describe.
Not sure if this is a bug or intentional, just something I noticed when setting up an MRE from the docs.
Describe the solution you'd like
When running a trial with lazy outputs, where one of those lazy outputs is cached from a previous run, it does not get shown in the artifact manager report. I think I understand why you might not want to ever load in a lazy object to show the value, so I'm a little confused as to why it does happen, but only for non-cached outputs.
Describe alternatives you've considered
🤷♀️
Additional context
Here's the script I was working with:
from dataclasses import dataclass
from curifactory import ArtifactManager, ExperimentParameters, Record, stage
from curifactory.caching import Lazy, PickleCacher
@dataclass
class MyParams(ExperimentParameters):
number: float = 1.0
@stage(inputs=None, outputs=[Lazy("initial_value")], cachers=[PickleCacher])
def get_initial_value(record):
my_value = 5
return my_value * record.params.number
@stage(inputs=["initial_value"], outputs=["final_value"], cachers=[PickleCacher])
def multiply_again(record, initial_value):
return initial_value * record.params.number
if __name__ == '__main__':
manager = ArtifactManager("experiment_one")
param_grid = [MyParams(number=number) for number in (0, 1, 2, 2)]
for param in param_grid:
record = Record(manager, param)
result = multiply_again(get_initial_value(record))
manager.generate_report()
And the result in the html report:
The text was updated successfully, but these errors were encountered:
Good catch, this was intentional back when we first added lazy cache loading because we had no simple way around it at the time, but this would be a good thing to address now and it should be relatively trivial to do so.
The metadata that gets saved with each artifact includes the preview string ("(int) 10" etc), so this should just be a matter of grabbing it from the metadata file if it's a Lazy instance, without needing to load the underlying artifact.
Is your feature request related to a problem? Please describe.
Not sure if this is a bug or intentional, just something I noticed when setting up an MRE from the docs.
Describe the solution you'd like
When running a trial with lazy outputs, where one of those lazy outputs is cached from a previous run, it does not get shown in the artifact manager report. I think I understand why you might not want to ever load in a lazy object to show the value, so I'm a little confused as to why it does happen, but only for non-cached outputs.
Describe alternatives you've considered
🤷♀️
Additional context
Here's the script I was working with:
And the result in the html report:
The text was updated successfully, but these errors were encountered: