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

Server Exception #6

Open
prabhant opened this issue Jun 24, 2020 · 1 comment
Open

Server Exception #6

prabhant opened this issue Jun 24, 2020 · 1 comment

Comments

@prabhant
Copy link
Collaborator

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
Copy link

Hmm, 2 things:

  • Does it make sense for the sequential model to have a default architecture?
  • Does it make sense for a layer to have a default type?

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?

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

No branches or pull requests

2 participants