automl / NASLib

NASLib is a Neural Architecture Search (NAS) library for facilitating NAS research for the community by providing interfaces to several state-of-the-art NAS search spaces and optimizers.
Apache License 2.0
519 stars 117 forks source link

AttributeError in zerocoast predictors implementation #185

Closed MichaelBohadana closed 3 months ago

MichaelBohadana commented 3 months ago

I encountered an issue with the zerocoast predictors implementation while testing predictors. The error message I received is:

loss_fn = graph.get_loss_fn() AttributeError: 'list' object has no attribute 'get_loss_fn'

It appears that the graph object, which represents all xtest, is being treated as a list instead of an object with a get_loss_fn method.

Neonkraft commented 3 months ago

Hi @MichaelBohadana,

Could you please provide a complete snippet which could be used to reproduce this issue?

MichaelBohadana commented 3 months ago

Hi @Neonkraft I set the predictor_config.yaml to the following: experiment_type: single search_space: nasbench201 dataset: cifar100 predictor: synflow

I believe other parameters are irrelevant for this purpose, but please let me know if any additional details are needed.

The error occurs when calling:

test_pred = self.predictor.query(xtest, test_info) in predictor_evaluator.py, resulting in: loss_fn = graph.get_loss_fn() AttributeError: 'list' object has no attribute 'get_loss_fn'

This happens inside the zerocost.py predictor implementation where graph is expected to be an nb201 search space object, but it actually receives a list of those objects.

Please let me know if further information is required.