Skip to content
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

Trying to save a experiment_type:str to SQA store #602

Closed
alxfed opened this issue Jun 18, 2021 · 3 comments
Closed

Trying to save a experiment_type:str to SQA store #602

alxfed opened this issue Jun 18, 2021 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@alxfed
Copy link

alxfed commented Jun 18, 2021

I'm trying to save an experiment_type string that has been assigned to the experiment_type property
of my Experiment to SQA Store.
It is declared as Optional[str] property in the signature of the Experiment class, and it assigns and reads beautifully. However, if you store the Experiment with this assigned (and present) experiment_type to the SQA store there is a 'null' in the column experiment_type of the experiment_v2 table. All the other fields are ORMapped to the table perfectly.

If you look at the properties of the class ax.storage.sqa_store.sqa_classes.SQAExperiment(*args: Any, **kwargs: Any)
experiment_type is Optional[int] = Column(None, Integer() there so it must be Enumed along the way somewhere

Should the experiment_types be declared or registered in some way before being used in Experiment classes so that they would store in the SQA store properly?

@lena-kashtelyan
Copy link
Contributor

lena-kashtelyan commented Jun 18, 2021

Hi, @alxfed! Great question. There are some docs on specifying experiment type here: https://ax.dev/docs/storage.html#customizing-1. In case a source code pointer is helpful, this is where the conversion to enum happens:

experiment_type = self.get_enum_value(
value=experiment.experiment_type, enum=self.config.experiment_type_enum
)

Let me know if this doesn't help!

@lena-kashtelyan lena-kashtelyan self-assigned this Jun 18, 2021
@lena-kashtelyan lena-kashtelyan added the question Further information is requested label Jun 18, 2021
@alxfed
Copy link
Author

alxfed commented Jun 18, 2021

Hi, again @lena-kashtelyan :) Thank you. That's exactly what I expected, but didn't manage to find this (really valuable for me) link. Thank you.

But I still can not make the save_experiment save this field to the SQA store table column.

P.S. Found it! the setting is in the SQAConfig. Got it. It would be good to mention it in the description of save_experiment somewhere... I think.

@alxfed alxfed closed this as completed Jun 18, 2021
@lena-kashtelyan
Copy link
Contributor

Good point!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants