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

examples: add mnist fgm demo which makes use of RESTAPI v1 #644

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from

Conversation

jtsextonMITRE
Copy link
Collaborator

Closes #596, except that the internals will need to be reworked to use the v1 client once it is fully finished.

examples: working training-only example with v1client

examples: working example of mnist-classifer with new client

examples: update notebook for documentation and slight cleanliness

examples: re-arrange cells & add mlflowrun capability to client

examples: add metric pull from mlflow for demo

examples: update demo & epochs parameter default

examples: add uuid's to demo

examples: moving mnist classifier to new folder and cleaning up notebook

examples: updated training YML to be more condensed and understandable

examples: cleaning up demo example

examples: fix metrics in demo example
@jayeew
Copy link

jayeew commented Sep 27, 2024

It seems not work.
when I run this code:
experiment_id, train_ep, queue_id = upload_experiment(client, 'src/train.yml','train','training a classifier on MNIST', PLUGIN_FILES, QUEUE_NAME, QUEUE_DESC, EXPERIMENT_NAME, EXPERIMENT_DESC)
The error code 400 returned.
2024-09-27 16:23:08 [error ] Error code 400 returned. data={'group': 1, 'name': 'train', 'description': 'training a classifier on MNIST', 'taskGraph': ' dataset:\n load_dataset:\n ep_seed: $seed\n data_dir: $training_dir\n subsets: [training, validation, testing]\n image_size: $image_size\n validation_split: $validation_split\n batch_size: $batch_size \n\n model:\n create_model:\n dataset: $dataset.training\n model_architecture: $model_architecture\n input_shape: $image_size\n learning_rate: $learning_rate\n optimizer: $optimizer_name\n metrics_list:\n - name: CategoricalAccuracy\n parameters: { name: accuracy }\n - name: Precision\n parameters: { name: precision }\n - name: Recall\n parameters: { name: recall }\n - name: AUC\n parameters: { name: auc }\n dependencies:\n - dataset\n\n trained_model:\n train:\n estimator: $model\n x: $dataset.training\n callbacks_list:\n - name: EarlyStopping\n parameters:\n monitor: val_loss\n min_delta: .01\n patience: 5\n restore_best_weights: true\n fit_kwargs:\n nb_epochs: $epochs\n validation_data: $dataset.validation\n verbose: 2\n dependencies:\n - model\n\n metrics:\n compute_metrics:\n classifier: $trained_model\n dataset: $dataset.testing\n dependencies:\n - trained_model\n\n save:\n save_artifacts_and_models:\n models:\n - name: $register_model_name\n model: $trained_model\n ', 'parameters': [{'name': 'seed', 'defaultValue': '-1', 'parameterType': 'integer'}, {'name': 'optimizer_name', 'defaultValue': 'Adam', 'parameterType': 'string'}, {'name': 'learning_rate', 'defaultValue': '0.001', 'parameterType': 'float'}, {'name': 'training_dir', 'defaultValue': '/dioptra/data/Mnist/training', 'parameterType': 'string'}, {'name': 'testing_dir', 'defaultValue': '/dioptra/data/Mnist/testing', 'parameterType': 'string'}, {'name': 'image_size', 'defaultValue': '[28, 28, 1]', 'parameterType': 'list'}, {'name': 'validation_split', 'defaultValue': '0.2', 'parameterType': 'float'}, {'name': 'batch_size', 'defaultValue': '32', 'parameterType': 'integer'}, {'name': 'model_architecture', 'defaultValue': 'le_net', 'parameterType': 'string'}, {'name': 'epochs', 'defaultValue': '30', 'parameterType': 'integer'}, {'name': 'register_model_name', 'defaultValue': 'mnist_classifier', 'parameterType': 'string'}], 'queues': [30], 'plugins': [31]} method=POST response={"schema_errors": {"parameters": {"0": {"parameterType": ["Must be one of: string, float, path, uri."]}, "5": {"parameterType": ["Must be one of: string, float, path, uri."]}, "7": {"parameterType": ["Must be one of: string, float, path, uri."]}, "9": {"parameterType": ["Must be one of: string, float, path, uri."]}}}} url=http://localhost:80/api/v1/entrypoints/

Is it the parameterType error??

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

Successfully merging this pull request may close these issues.

2 participants