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

K-67: Validate if train/serve file is executable #72

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

ms-shankar
Copy link
Contributor

Description

Closes issue 67

Checklist

  • An issue was first created before opening this pull request
  • The new code follows the kaos contribution guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests to ensure that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@ms-shankar ms-shankar requested review from jfri3d and aalhour November 11, 2019 14:15
Copy link
Contributor

@jfri3d jfri3d left a comment

Choose a reason for hiding this comment

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

Shankar,

Some changes are required since the SHEBANG check forces python3... while we should only care an ENV is selected (not which).

Lastly, we should also check for the ./serve file since it is also run as an executable. Might not have been in the original issue scope but should be added.

backend/kaos_backend/util/tests/test_validators.py Outdated Show resolved Hide resolved
backend/kaos_backend/util/tests/test_validators.py Outdated Show resolved Hide resolved
backend/kaos_backend/util/validators.py Outdated Show resolved Hide resolved
backend/kaos_backend/util/validators.py Outdated Show resolved Hide resolved
backend/kaos_backend/util/validators.py Outdated Show resolved Hide resolved
backend/kaos_backend/util/validators.py Outdated Show resolved Hide resolved
@jfri3d jfri3d changed the title K-67: Validate if train file is executable K-67: Validate if train/serve file is executable Nov 12, 2019
@ms-shankar ms-shankar self-assigned this Nov 27, 2019
ImScientist
ImScientist previously approved these changes Jan 20, 2020
Copy link
Contributor

@ImScientist ImScientist left a comment

Choose a reason for hiding this comment

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

LGTM

@ms-shankar ms-shankar requested review from jfri3d, ImScientist and aalhour and removed request for aalhour and jfri3d January 20, 2020 15:08
@aalhour
Copy link
Contributor

aalhour commented Feb 4, 2020

@ms-shankar, @ImScientist, how can I test the PR changes locally?

@ms-shankar
Copy link
Contributor Author

Hi @aalhour,

These changes can be tested by following the quickstart documentation to

  1. setup workspace
  2. loading mnist template
  3. After loading the template, modify /templates/mnist/model-train/mnist/model/train in order to remove the shebang line at the top and change it from being an executable
  4. Run the train command, and the train command should fail throwing appropriate errors.
  5. Repeat the same change in the /templates/mnist/model-serve/mnist/model/serve and run the serve command to check appropriate validation errors are encountered.

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

Successfully merging this pull request may close these issues.

4 participants