From 66b8848f4250558c5ad381fbb80756f9c10f7eb4 Mon Sep 17 00:00:00 2001 From: guillaume-salle Date: Thu, 25 Aug 2022 12:11:20 +0200 Subject: [PATCH 1/4] Create User_Guide.md --- User_Guide.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 User_Guide.md diff --git a/User_Guide.md b/User_Guide.md new file mode 100644 index 0000000..174ea02 --- /dev/null +++ b/User_Guide.md @@ -0,0 +1,14 @@ +You need an username and password on the database of the GraphL server, if you need one contact someone with an admin account. +Create an account on https://wandb.ai/site and get an API key (in settings), it will be used to get the results of your jobs. +You need a docker image for your projects with the setps you want to execute on the workstation as entrypoint or cmd in the dockerfile. +In order to get back the results of your tasks, you need to add code to save the results on your wandb account. +A minimal python script that save the content of a directory to your wandb account: +`import wandb +wandb.init(project="sbb2") +wandb.save("models/*", policy="now")`. +You can also use more advanced saving options from the SDK of wandb : https://docs.wandb.ai/. +Create your docker image and upload it to https://hub.docker.com/, it must not contain any secret. +Go to http://54.77.14.151:8080/playground. +Follow the steps in readme : https://github.com/42-AI/ws-backend#readme for login. +Use the login token as env variable as well as your wandb API key, and create a task (readme). +You should get the results of your job on your wandb accont. From e3c34a7de18f7aa1eebccaad46f784ed2a06b0bc Mon Sep 17 00:00:00 2001 From: guillaume-salle Date: Thu, 25 Aug 2022 12:12:54 +0200 Subject: [PATCH 2/4] Update User_Guide.md --- User_Guide.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/User_Guide.md b/User_Guide.md index 174ea02..ad5abfe 100644 --- a/User_Guide.md +++ b/User_Guide.md @@ -1,14 +1,14 @@ -You need an username and password on the database of the GraphL server, if you need one contact someone with an admin account. -Create an account on https://wandb.ai/site and get an API key (in settings), it will be used to get the results of your jobs. -You need a docker image for your projects with the setps you want to execute on the workstation as entrypoint or cmd in the dockerfile. -In order to get back the results of your tasks, you need to add code to save the results on your wandb account. -A minimal python script that save the content of a directory to your wandb account: +You need an username and password on the database of the GraphL server, if you need one contact someone with an admin account. +Create an account on https://wandb.ai/site and get an API key (in settings), it will be used to get the results of your jobs. +You need a docker image for your projects with the setps you want to execute on the workstation as entrypoint or cmd in the dockerfile. +In order to get back the results of your tasks, you need to add code to save the results on your wandb account. +A minimal python script that save the content of a directory to your wandb account: `import wandb wandb.init(project="sbb2") wandb.save("models/*", policy="now")`. -You can also use more advanced saving options from the SDK of wandb : https://docs.wandb.ai/. -Create your docker image and upload it to https://hub.docker.com/, it must not contain any secret. -Go to http://54.77.14.151:8080/playground. -Follow the steps in readme : https://github.com/42-AI/ws-backend#readme for login. -Use the login token as env variable as well as your wandb API key, and create a task (readme). -You should get the results of your job on your wandb accont. +You can also use more advanced saving options from the SDK of wandb : https://docs.wandb.ai/. +Create your docker image and upload it to https://hub.docker.com/, it must not contain any secret. +Go to http://54.77.14.151:8080/playground. +Follow the steps in readme : https://github.com/42-AI/ws-backend#readme for login. +Use the login token as env variable as well as your wandb API key, and create a task (readme). +You should get the results of your job on your wandb account. From 2bb8b11b9bf246c281986e7e886285218b5d2639 Mon Sep 17 00:00:00 2001 From: guillaume-salle Date: Thu, 25 Aug 2022 12:24:36 +0200 Subject: [PATCH 3/4] Update User_Guide.md --- User_Guide.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/User_Guide.md b/User_Guide.md index ad5abfe..ac6583c 100644 --- a/User_Guide.md +++ b/User_Guide.md @@ -1,14 +1,16 @@ -You need an username and password on the database of the GraphL server, if you need one contact someone with an admin account. -Create an account on https://wandb.ai/site and get an API key (in settings), it will be used to get the results of your jobs. -You need a docker image for your projects with the setps you want to execute on the workstation as entrypoint or cmd in the dockerfile. -In order to get back the results of your tasks, you need to add code to save the results on your wandb account. -A minimal python script that save the content of a directory to your wandb account: -`import wandb -wandb.init(project="sbb2") -wandb.save("models/*", policy="now")`. -You can also use more advanced saving options from the SDK of wandb : https://docs.wandb.ai/. -Create your docker image and upload it to https://hub.docker.com/, it must not contain any secret. -Go to http://54.77.14.151:8080/playground. -Follow the steps in readme : https://github.com/42-AI/ws-backend#readme for login. -Use the login token as env variable as well as your wandb API key, and create a task (readme). -You should get the results of your job on your wandb account. +- You need an username and password on the database of the GraphL server, if you need one contact someone with an admin account. +- Create an account on https://wandb.ai/site and get an API key (in settings), it will be used to get the results of your jobs. +- You need a docker image for your projects with the setps you want to execute on the workstation as entrypoint or cmd in the dockerfile. +- In order to get back the results of your tasks, you need to add code to save the results on your wandb account. +A minimal python script that save the content of a directory called `models` to your wandb account: +``` +import wandb +wandb.init(project="sbb2") +wandb.save("models/*", policy="now") +``` +- You can also use more advanced saving options from the SDK of wandb : https://docs.wandb.ai/. +- Create your docker image and upload it to https://hub.docker.com/, it must NOT contain any secret. +- Go to http://54.77.14.151:8080/playground. +- Follow the steps in [readme](https://github.com/42-AI/ws-backend#readme) for login. +- Use the login token as header variable (cf [readme](https://github.com/42-AI/ws-backend/tree/gs/doc/user-tutorial#create-a-machine-learning-task](https://github.com/42-AI/ws-backend/tree/gs/doc/user-tutorial#create-a-user))), and [create a task](https://github.com/42-AI/ws-backend/tree/gs/doc/user-tutorial#create-a-machine-learning-task) with the API key as env variable. +- You should get the results of your job on your wandb account. From b909dc8ad767ed36b19b5b183589cadfffacf544 Mon Sep 17 00:00:00 2001 From: guillaume-salle Date: Wed, 7 Sep 2022 23:12:44 +0200 Subject: [PATCH 4/4] Update Use_guide.md --- User_Guide.md | 68 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 9 deletions(-) diff --git a/User_Guide.md b/User_Guide.md index ac6583c..e237653 100644 --- a/User_Guide.md +++ b/User_Guide.md @@ -1,16 +1,66 @@ -- You need an username and password on the database of the GraphL server, if you need one contact someone with an admin account. -- Create an account on https://wandb.ai/site and get an API key (in settings), it will be used to get the results of your jobs. +# User guide +- You need a username and password on the database of the GraphL server, if you want one contact someone with an admin account. +- Create an account on https://wandb.ai/site and get an API key (in settings), it will be used to get the results of your jobs. - You need a docker image for your projects with the setps you want to execute on the workstation as entrypoint or cmd in the dockerfile. -- In order to get back the results of your tasks, you need to add code to save the results on your wandb account. -A minimal python script that save the content of a directory called `models` to your wandb account: +Create your docker image and upload it to https://hub.docker.com/, it must NOT contain any secret. +- In order to get back the results of your tasks, you need to add code executed by your container to save the results on your wandb account. +A minimal python script that saves the content of a directory called `models` to your wandb account: ``` import wandb -wandb.init(project="sbb2") +wandb.init(project="project_name") wandb.save("models/*", policy="now") ``` -- You can also use more advanced saving options from the SDK of wandb : https://docs.wandb.ai/. -- Create your docker image and upload it to https://hub.docker.com/, it must NOT contain any secret. +You can also use more advanced saving options from the SDK of wandb : https://docs.wandb.ai/. - Go to http://54.77.14.151:8080/playground. -- Follow the steps in [readme](https://github.com/42-AI/ws-backend#readme) for login. -- Use the login token as header variable (cf [readme](https://github.com/42-AI/ws-backend/tree/gs/doc/user-tutorial#create-a-machine-learning-task](https://github.com/42-AI/ws-backend/tree/gs/doc/user-tutorial#create-a-user))), and [create a task](https://github.com/42-AI/ws-backend/tree/gs/doc/user-tutorial#create-a-machine-learning-task) with the API key as env variable. +- Follow the steps in [readme](https://github.com/42-AI/ws-backend#login) for login : +copy the following request to log in your user : +``` +query login { + login (id: "your_user_id", pwd: "your-password") { + ... on Token { + token + userId + username + isAdmin + } + ... on Error { + code + message + } + } +} +``` +You should get a response similar to this : +``` +{ + "data": { + "login": { + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdXRob3JpemVkIjp0cnVlLCJleHAiOjE2MTczODMzNDksInVzZXJfaWQiOiJkZjljNDYzZC00ZmIwLTRmYzAtYTU5OC00YmQ3NzEzMzg2ZDAifQ.Xj_rUGIB7l90kiXD_U12ni2kf9U-afARaCZKbEao-oU", + "userId": "df9c463d-4fb0-4fc0-a598-4bd7713386d0", + "username": "your_user_id" + } + } +} +``` +Copy the `token` value. +- Use the login token as header variable (cf readme [create a user](https://github.com/42-AI/ws-backend/tree/gs/doc/user-tutorial#create-a-user)) in `HTTP HEADERS` : +``` +{ + "auth": "your_token" +} +``` +and [create a task](https://github.com/42-AI/ws-backend/tree/gs/doc/user-tutorial#create-a-machine-learning-task) with your wandb API key as env variable : +``` +mutation createTask { + create_task(input:{env:"WANDB_API_KEY=putYourKeyHere", docker_image:"jjauzion/wandb-test", dataset:"s3//"}) { + id + user_id + created_at + started_at + ended_at + status + job { dataset, docker_image, env } + } +} +``` - You should get the results of your job on your wandb account.