R - Example Project¶
In this tutorial, we will create a R machine learning project based on our R example on GitHub.
Create a project¶
Login to app.valohai.com
Press Create Project
Set a
Name
for your project, e.g. test-rYou can leave
Description
blank, that is more in detail definition of your projectPress the Create button
Link a version control repository¶
A valid source repository must contain a valohai.yaml
configuration file that defines how workers will run your machine learning code. All of our examples have that defined already.
Let’s set up a repository for your project:
Go to the example repository page on GitHub:
https://github.com/valohai/r-example
If you want to modify the training code, you can fork the repository first.
Copy the HTTPS URL of the repository:
https://github.com/valohai/r-example.git
Using an SSH URLs work only for private GitHub repositories.
Go to the Repository tab inside your new project to set your source repository
Paste the URL above to the
URL
field on the Repository tabLeave
Fetch reference
as the default value masterSSH private key
is only required if your Git repository is privatePress the Save button
Create an execution¶
Go to the Executions tab inside your project
Press the Create execution button
The
Step
field lists all available types of executions. Make sure Metadata example is selected.You don’t need to worry about the rest of the configuration for now. The default inputs and parameters of the form are loaded from the
valohai.yaml
configuration file and should be good for this example execution.Press Submit to start the execution.
Tip
Valohai command-line client allows creating one-off executions from local files. See Using valohai-cli for more details.
vh exec run --adhoc --watch name-of-your-step
# sends local source code to a worker and runs commands in valohai.yaml
View the results¶
After you start the execution, you are forwarded to the execution page.
This page has several tabs with execution details:
The Information tab shows the basic information about the execution, most of which could’ve been modified in the previous execution creation step.
The Log tab shows real-time log output from the execution. Anything that your code prints to the standard output (stdout) or standard error (stderr) streams is shown here.
The Metadata tab shows all the metadata output from the execution. You can also plot the metadata on a line chart. Metadata is any data your execution writes to the standard output stream in JSON which we can parse. If no plottable metadata has been output, this tab is not visible.
The Output tab contains download links for all the output artifacts created by the execution.
The execution defines these outputs by writing them into /valohai/outputs
directory.
The artifacts are stored in AWS S3.
If the execution has not finished, or did not output any files, this tab will not be visible.
Next steps¶
Congratulations on running actual machine learning code on the cloud!
For next steps we would encourage reading about the core concepts of Valohai platform to gain a better understanding of all the bells and whistles.