-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_from_catalog does not return a fresh copy of the catalog object #1364
Comments
A not fresh copy meaning it is effectively a singleton? not sure I understand |
from unitxt.artifact import fetch_artifact
from unitxt.catalog import get_from_catalog
card1, _ = fetch_artifact("cards.banking77")
print(card1.task.metrics) # prints ['metrics.f1_micro', 'metrics.accuracy', 'metrics.f1_macro']
card1.task.metrics = ['metrics.accuracy']
print(card1.task.metrics) # prints ['metrics.accuracy']
card2, _ = fetch_artifact("cards.banking77")
print(card2.task.metrics) # prints ['metrics.f1_micro', 'metrics.accuracy', 'metrics.f1_macro']
card3 = get_from_catalog("cards.banking77")
print(card3.task.metrics) # prints ['metrics.f1_micro', 'metrics.accuracy', 'metrics.f1_macro']
card3.task.metrics = ['metrics.accuracy']
print(card3.task.metrics) # prints ['metrics.accuracy']
card4 = get_from_catalog("cards.banking77")
print(card4.task.metrics) # prints ['metrics.accuracy'] |
Perhaps that cache needs to return a recursive copy of what it has to offer, like the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
get_from_catalog does not return a fresh copy of the catalog object
fetch_artifact returns a new value every time:
The text was updated successfully, but these errors were encountered: