<jupyter_start><jupyter_text>Image classificationThere are classes for featurized tasks (classification, multi-label classification, regression) and image tasks (classification). You can import them via:<jupyter_code>from autoPyTorch import AutoNetImageClassification

# Other imports for later usage
import pandas as pd
import numpy as np
import os as os
import openml
import json


autonet_config = {
    "budget_type" : "epochs",
    "images_shape": [3,32,32],
    "networks": ["convnet_cus"],
    "loss_modules": ["cross_entropy"],
    "batch_loss_computation_techniques": ["standard"],
    "lr_scheduler": ["step"],
    "optimizer": ["sgd"],
    }


autonet = AutoNetImageClassification(config_preset="full_cs",
                                     result_logger_dir="logs/",
                                     **autonet_config,
                                    )


# Get the current configuration as dict
current_configuration = autonet.get_current_autonet_config()

# Get the ConfigSpace object with all hyperparameters, conditions, default values and default ranges
hyperparameter_search_space = autonet.get_hyperparameter_search_space()

# Print all possible configuration options
autonet.print_help()
autonet.get_hyperparameter_search_space().sample_configuration()
csv_dir = os.path.abspath("../../datasets/cifar-10/train.csv")
df = pd.read_csv(csv_dir, header=None)
X_train = df.values[:,0]
Y_train = df.values[:,1]
print(X_train.shape)
print(Y_train.shape)

results_fit = autonet.fit(
                         log_level='debug',
                         X_train=X_train,
                         Y_train=Y_train,
                         images_shape=[3,32,32],
                         min_budget=1,
                         max_budget=5,
#                          max_runtime=1800,
                        images_root_folders=[os.path.abspath("../../datasets/cifar-10/train/train")],
                        )
# Save fit results as json
with open("logs/results_fit.json", "w") as file:
    json.dump(results_fit, file)
csv_dir = os.path.abspath("../../datasets/cifar-10/test.csv")
df_test = pd.read_csv(csv_dir, header=None)
X_test = df_test.values[:,0]
Y_test = df_test.values[:,1]
print(X_test.shape)
print(Y_test.shape)
pytorch_model = autonet.get_pytorch_model()
print(pytorch_model)<jupyter_output>Sequential(
  (0): Conv2d(3, 13, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (1): ReLU(inplace=True)
  (2): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
  (3): Conv2d(13, 10, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (4): ReLU(inplace=True)
  (5): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
  (6): Conv2d(10, 10, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (7): ReLU(inplace=True)
  (8): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
)
{'fraction_non_alphanumeric': 0.1337269885376867, 'fraction_numerical': 0.028482111844390413, 'mean_word_length': 3.2793462109955422, 'pattern_counts': {'":': 6, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '407129', 'license': 'Apache-2.0', 'n_tokens_mistral': 1011, 'n_tokens_neox': 949, 'n_words': 191, 'path': 'examples/basics/Auto-PyTorch Tutorial.ipynb', 'repo_name': 'lindsey98/Auto-PyTorch', 'size': '2879'}