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

📚 Epic: TPI basic scenario #208

Closed
dmpetrov opened this issue Sep 13, 2021 · 10 comments
Closed

📚 Epic: TPI basic scenario #208

dmpetrov opened this issue Sep 13, 2021 · 10 comments
Assignees
Labels
bug Something isn't working epic Collection of sub-issues

Comments

@dmpetrov
Copy link
Member

dmpetrov commented Sep 13, 2021

Goal: get resources from CLI (through TF provider) without using CI/CD.

  1. Basic Python scenario
    A user
  • installs TPI on laptop
  • specifies cloud creds
  • modifies a instance type (like p2.xlarge), image (like ami-abcd1234) and region (like us-west).
  • specifies data directory to sync to the machine (a dir for input data as well as result/model)
  • specifies requirements.txt and/or Dockerfile (separate epic)
  • copy to the instance train.py script and run it there

Results:

  • new instance starts
  • the data directory should contain both the input data and the model
  • user sees log from terminal
  • in case of errors the model is not synchronized but the user should see all the errors in a terminal
  • the instance is terminated after the job is done (for success as well as failure).
  1. Basic R scenario
    Similar to Python. But no requirements.txt

Details:

  • The actions/commands users take should match the actions from CML scenario as much as possible.
  • Supported clouds: AWS, Azure, GCP, K8S.
  • This scenario should work without Git and DVC
  • Only simple train.py synchronization is included. More complicated code sync in a separate issue 📚 Epic: Advance code sync #212
@dmpetrov dmpetrov added the epic Collection of sub-issues label Sep 13, 2021
@dmpetrov dmpetrov changed the title 📚 User story: TPI basic scenario 📚 Epic: TPI basic scenario Sep 13, 2021
@DavidGOrtega
Copy link
Contributor

@dmpetrov can we make this basic scenario language agnostic? Instead of requirements or Dockerfile it requires a script to be executed.

@0x2b3bfa0
Copy link
Member

0x2b3bfa0 commented Sep 13, 2021

I like the idea of making it language–agnostic at the package level (i.e. requirements.txt, poetry.lock, packrat.lock, ...), but I do see the value of allowing OCI/Docker containers as an alternative to plain scripts.

@casperdcl casperdcl added the bug Something isn't working label Sep 16, 2021
@DavidGOrtega DavidGOrtega self-assigned this Sep 17, 2021
@0x2b3bfa0

This comment has been minimized.

@DavidGOrtega
Copy link
Contributor

DavidGOrtega commented Sep 17, 2021

I like the idea of making it language–agnostic at the package level (i.e. requirements.txt, poetry.lock, packrat.lock, ...), but I do see the value of allowing OCI/Docker containers as an alternative to plain scripts.

Python biased (launching train.py) does not allow you to execute dvc cli nor other ML tools based on cli or others valuable programming languages like R, JS... But... whatever

@0x2b3bfa0
Copy link
Member

0x2b3bfa0 commented Sep 17, 2021

Python biased (launching train.py) does not allow you to execute dvc cli nor other ML tools based on cli or others valuable programming languages like R, JS...

Agreed! Even if the two of the lock files I mentioned are for Python, the third one is for R, and they're just examples apropos of the epic.

My point is that, as you say, plain [shell] scripts are the right abstraction for providing multi–language support, but it would be nice to wrap all that in the deterministic and isolated environment provided by containers.

In the most basic use case, we would provide a cached container image with a full–featured environment, and users wouldn't even notice we use containers. If they wish, they could specify a custom container image, instead of a machine image; #146.

@DavidGOrtega
Copy link
Contributor

DavidGOrtega commented Sep 18, 2021

Docker will be a special case of the executor. Gitlab's executor is exactly the same that Im talking about.

The goal of the executor is to run a shell script. For that gitlab has several strategies like docker where it provisions the container and runs the script inside, ssh where it connects to an external machine and runs there and of course plain Bash. executor. There is no need to go towards a specific Docker implementation when we can solve it first for a wider scenario.

Thats my two cents. But lets formalice our proposals and architectures

@dmpetrov
Copy link
Member Author

Sure! It should be language agnostic. I added 2nd use case with R to emphasize on this Basic R scenario.

It might be nice to have some features like install requirements.txt. But it looks like a separate story / epic. Removing requirements.txt from the description.

@jbencook
Copy link

jbencook commented Oct 5, 2021

Are GCP and k8s hard requirements for this basic scenario?

@0x2b3bfa0
Copy link
Member

Not sure how hard are they in the Mohs scale, 😄 but they work and don't seem to be a blocker.

@DavidGOrtega DavidGOrtega removed their assignment Nov 11, 2021
@0x2b3bfa0 0x2b3bfa0 self-assigned this Nov 24, 2021
@0x2b3bfa0
Copy link
Member

Closed with #237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working epic Collection of sub-issues
Projects
None yet
Development

No branches or pull requests

5 participants