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

Chapter 8; Save Model Issue #13

Open
efakinpelu opened this issue Apr 30, 2024 · 0 comments
Open

Chapter 8; Save Model Issue #13

efakinpelu opened this issue Apr 30, 2024 · 0 comments

Comments

@efakinpelu
Copy link

I ran the example in Chapter8_Explainable_AI_example_based.ipynb.

At the save.model(model_dir) in the task.py

The response was successful as logged in vertex log explorer:
{
"insertId": "ozelsaf300i0q",
"jsonPayload": {
"created": 1714486192.5947006,
"pathname": "/root/.local/lib/python3.10/site-packages/trainer/task.py",
"levelname": "INFO",
"message": "Save Model in /home/jupyter/deliverables/models/mobilenetv2-stl10",
"lineno": 157
},
"resource": {
"type": "ml_job",
"labels": {
"task_name": "workerpool0-0",
"project_id": "aettestproject",
"job_id": "3767745457527193600"
}
},
"timestamp": "2024-04-30T14:09:52.594700574Z",
"severity": "INFO",
"labels": {
"ml.googleapis.com/tpu_worker_id": "",
"compute.googleapis.com/resource_name": "cmle-training-9086692346772892803",
"ml.googleapis.com/task_ray_name": "",
"ml.googleapis.com/job_id/log_area": "root",
"ml.googleapis.com/trial_id": "",
"ml.googleapis.com/trial_type": "",
"ml.googleapis.com/ray_cluster_id": "",
"compute.googleapis.com/resource_id": "2390197471379540782",
"compute.googleapis.com/zone": "us-central1-c"
},
"logName": "projects/aettestproject/logs/workerpool0-0",
"receiveTimestamp": "2024-04-30T14:09:56.501126764Z"
}

However, I cannot find the model file in the indicated model directory.

I have gone on to add the '.keras' extension to the model file name on line 156 in the task.py file

model.save(model_dir+'.keras')

Wheh, when I run the model on the VM, I was able to successfully save the file to the model directory, but when I submit the job to the vertex worker_pool I did not save the model in the expected directory even when the directory indicated the google bucket

The platform information
sys.version == python version 3.10.13
tf.version == tensorflow version 4.12.0
tfds.version == tensorflow dataset version 4.9.1

Please I would appreciate if someone can help me understand what I am doing wrong.

Thank you

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

No branches or pull requests

1 participant