openml / openml-keras

Keras extension for openml-python
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Server Exception #6

Open prabhant opened 4 years ago

prabhant commented 4 years ago

Model:

import keras
import openml
import openml_keras
from keras.layers import GlobalAveragePooling2D, Conv2D, BatchNormalization, Dense, MaxPooling2D, Dropout, Flatten, Reshape
from keras.applications.vgg16 import VGG16

model = keras.models.Sequential([
                          Reshape((32,32,3), input_shape=(3072,)),
                          VGG16(weights='imagenet', 
                          include_top=False, 
                          input_shape=(32, 32, 3)),
                          GlobalAveragePooling2D(),
                          BatchNormalization(),
                          Dense(256, activation='relu'),
                          Dropout(0.25),
                          Dense(units=10, activation=keras.activations.softmax),

                        ])

model.compile(optimizer='adam',
              loss='sparse_categorical_crossentropy',
              metrics=['accuracy'])
###########################################

Error:

Traceback (most recent call last):
  File "keras_tl.py", line 34, in <module>
    run.publish()
  File "/home/TUE/20194259/miniconda3/envs/openml_keras/lib/python3.7/site-packages/openml/base.py", line 123, in publish
    file_elements = self._get_file_elements()
  File "/home/TUE/20194259/miniconda3/envs/openml_keras/lib/python3.7/site-packages/openml/runs/run.py", line 455, in _get_file_elements
    self.flow.publish()
  File "/home/TUE/20194259/miniconda3/envs/openml_keras/lib/python3.7/site-packages/openml/flows/flow.py", line 388, in publish
    super().publish()
  File "/home/TUE/20194259/miniconda3/envs/openml_keras/lib/python3.7/site-packages/openml/base.py", line 130, in publish
    call, 'post', file_elements=file_elements
  File "/home/TUE/20194259/miniconda3/envs/openml_keras/lib/python3.7/site-packages/openml/_api_calls.py", line 53, in _perform_api_call
    return _read_url_files(url, data=data, file_elements=file_elements)
  File "/home/TUE/20194259/miniconda3/envs/openml_keras/lib/python3.7/site-packages/openml/_api_calls.py", line 86, in _read_url_files
    raise _parse_server_exception(response, url, file_elements=file_elements)
openml.exceptions.OpenMLServerException:

<oml:flow xmlns:oml="http://openml.org/openml">
        <oml:name>keras.engine.sequential.Sequential.e70b4fbc</oml:name>
        <oml:class_name>keras.engine.sequential.Sequential.e70b4fbc</oml:class_name>
        <oml:external_version>keras==2.2.4,openml==0.10.2</oml:external_version>
        <oml:description>Automatically created keras flow.</oml:description>
        <oml:language>English</oml:language>
        <oml:dependencies>keras==2.2.4
numpy&gt;=1.6.1
scipy&gt;=0.9</oml:dependencies>
        <oml:parameter>
                <oml:name>backend</oml:name>
                <oml:default_value>"tensorflow"</oml:default_value>
        </oml:parameter>
        <oml:parameter>
                <oml:name>class_name</oml:name>
                <oml:default_value>"Sequential"</oml:default_value>
        </oml:parameter>
        <oml:parameter>
                <oml:name>config</oml:name>
                <oml:default_value>{"name": "sequential_1"}</oml:default_value>
        </oml:parameter>
        <oml:parameter>

        <oml:parameter>
                <oml:name>keras_version</oml:name>
                <oml:default_value>"2.2.4"</oml:default_value>
        </oml:parameter>
        <oml:parameter>
                <oml:name>layer0_reshape_1</oml:name>
                <oml:default_value>{"class_name": "Reshape", "config": {"batch_input_shape": [null, 3072], "dtype": "float32", "name": "reshape_1", "target_shape": [32, 32, 3], "trainable": true}}</oml:default_$
        </oml:parameter>
        <oml:parameter>
                <oml:name>layer1_vgg16</oml:name>
                <oml:default_value>{"class_name": "Model", "config": {"input_layers": [["input_1", 0, 0]], "layers": [{"class_name": "InputLayer", "config": {"batch_input_shape": [null, 32, 32, 3], "dtype": "fl$
        </oml:parameter>
        <oml:parameter>
                <oml:name>layer2_global_average_pooling2d_1</oml:name>
                <oml:default_value>{"class_name": "GlobalAveragePooling2D", "config": {"data_format": "channels_last", "name": "global_average_pooling2d_1", "trainable": true}}</oml:default_value>
        </oml:parameter>
        <oml:parameter>
                <oml:name>layer3_batch_normalization_1</oml:name>
                <oml:default_value>{"class_name": "BatchNormalization", "config": {"axis": -1, "beta_constraint": null, "beta_initializer": {"class_name": "Zeros", "config": {}}, "beta_regularizer": null, "cent$
        </oml:parameter>
        <oml:parameter>
                <oml:name>layer4_dense_1</oml:name>
                <oml:default_value>{"class_name": "Dense", "config": {"activation": "relu", "activity_regularizer": null, "bias_constraint": null, "bias_initializer": {"class_name": "Zeros", "config": {}}, "bia$
        </oml:parameter>
        <oml:parameter>
                <oml:name>layer5_dropout_1</oml:name>
                <oml:default_value>{"class_name": "Dropout", "config": {"name": "dropout_1", "noise_shape": null, "rate": 0.25, "seed": null, "trainable": true}}</oml:default_value>
        </oml:parameter>
        <oml:parameter>
                <oml:name>layer6_dense_2</oml:name>
                <oml:default_value>{"class_name": "Dense", "config": {"activation": "softmax", "activity_regularizer": null, "bias_constraint": null, "bias_initializer": {"class_name": "Zeros", "config": {}}, "$
        </oml:parameter>
        <oml:parameter>
                <oml:name>optimizer</oml:name>
                <oml:default_value>{"loss": "sparse_categorical_crossentropy", "loss_weights": null, "metrics": ["accuracy"], "optimizer_config": {"class_name": "Adam", "config": {"amsgrad": false, "beta_1": 0.$
        </oml:parameter>
        <oml:tag>openml-python</oml:tag>
        <oml:tag>keras</oml:tag>
        <oml:tag>python</oml:tag>
        <oml:tag>keras_2.2.4</oml:tag>
</oml:flow>

Problem validating uploaded description file - XML does not correspond to XSD schema. Error Element '{http://openml.org/openml}default_value': [facet 'maxLength'] The value has a length of '10218'; this exceeds$
 on line 32 column 0. Error Element '{http://openml.org/openml}default_value': '{&quot;class_name&quot;: &quot;Model&quot;, &quot;config&quot;: {&quot;input_layers&quot;: [[&quot;input_1&quot;, 0, 0]], &quot;la$
 on line 32 column 0.
joaquinvanschoren commented 4 years ago

Hmm, 2 things:

I think it makes sense to have default values for certain types, like the number and size of filters in a convnet, but a default setting for the nth layer doesn’t make sense?