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

Fix for issue #970 #1011

Merged
merged 2 commits into from
Dec 16, 2019
Merged

Conversation

elogicaadith
Copy link
Contributor

Description

existing code, in base_model.py, under the fit function -

if self.hparams.save_model:

        if epoch % self.hparams.save_epoch == 0:
            checkpoint_path = self.saver.save(
                sess=train_sess,
                save_path= self.hparams.MODEL_DIR + "epoch_" + str(epoch),
            )

Modified code:
from os.path import join
.
.
.

if self.hparams.save_model:
if epoch % self.hparams.save_epoch == 0:
save_path_str = join(self.hparams.MODEL_DIR, "epoch_" + str(epoch))
checkpoint_path = self.saver.save(
sess=train_sess,
save_path= save_path_str,
)

Azure Machine Learning service tests :-

Code in AML -
image

AML outputs folder -
image

Local machine tests (using xdeepfm_criteo notebook in 00_quick_start) :-

prepare_hparams() -

image

local directory -

image

When running the xDeepFM script, the model was not getting saved to the ./outputs directory in the Azure Machine Learning Service. This was due to the way in which the string concatenation for save directory was set up - the model directory & the file names were concatenated without a "/" in between them. As a result, Azure Machine Learning Service was not able to save models.

Related Issues

This is a fix for Issue #970

Checklist:

  • I have followed the contribution guidelines and code style for this project.
  • I have added tests covering my contributions.
  • I have updated the documentation accordingly.

@elogicaadith
Copy link
Contributor Author

@miguelgfierro - Hello Miguel! I'm now using os.path.join to concatenate the save path string. :)

@elogicaadith elogicaadith changed the title Staging Fix for issue #970 Dec 16, 2019
Copy link
Collaborator

@miguelgfierro miguelgfierro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks!

@miguelgfierro miguelgfierro merged commit a53e576 into recommenders-team:staging Dec 16, 2019
@miguelgfierro miguelgfierro mentioned this pull request Dec 19, 2019
3 tasks
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