Thank you! For now, it's kind of nice that it just picks up your credentials from your conf file. No extra setup required beyond the onboarding ClearML has you do 😄
And look! It's working, assuming you start the clearml session up yourself:
Here's the repo: I've recorded a few update videos documenting how we learned about authoring VS Code extensions and how we got it to it's current state. Linked to those in order in the README.
ChatGPT has made working with TypeScript and the VSCode extension framework really nice! None
This is a low-key open-source project if anyone wanted to contribute. Since the project is early, there are lots of high-impact things, e.g. UI polish, that would be relatively low effort 😄
but realized calling that from the extension would be hard, so we opted to have the TypeScript code make calls to the ClearML API server directly, e.g.
POST /tasks.get_all_ex
.
did you manage to get that working?
- To get the credentials, we read the
~/clearml.conf
file. I tried hard, but couldn't get a TypeScript library to work to parse the HOCON config file format... so I eventually resorted to using (likely brittle) regex to grab the ClearML endpoint and API keys to make the requests.first, NICE!, second, another option is to just copy paste the credentials into the vscode plugin settings section, wdyt?
This is a low-key open-source project if anyone wanted to contribute. Since the project is early, there are lots of high-impact things, e.g. UI polish, that would be relatively low effort
is there a link to the git repo ?
How it works / what we finished:
- We used the SaaS ClearML, started an EC2 instance, and manually installed and ran the
clearml-agent daemon
on it - We ran
clearml-init
on our laptops to generate theclearml.conf
file. - The extension is in TypeScript, so...
- We started trying to write code with the Python SDK to list sessions, but realized calling that from the extension would be hard, so we opted to have the TypeScript code make calls to the ClearML API server directly, e.g.
POST /tasks.get_all_ex
. - To get the credentials, we read the
~/clearml.conf
file. I tried hard, but couldn't get a TypeScript library to work to parse the HOCON config file format... so I eventually resorted to using (likely brittle) regex to grab the ClearML endpoint and API keys to make the requests. - The extension prompts the user and auto-install the
clearml
andclearml-session
SDK in the currently active Python virtualenv. - You can run the
clearml-session --attach
command from the extension.
Enhancements would be: - Have VS Code watch the logs of
clearml-session --attach
, and then open the VS Code window to remote into that automatically. - Also discover the SSH password and auto-enter that so the user doesn't have to look it up.- Publishing it to the VS Code extension marketplace - Adding tests, cleaning up the code
- Support full CRUD operations for sessions- Allowing the user to specify presets for creating sessions with favorite libraries, docker images, and other settings
- Adding a better way to view more information about running sessions, e.g. queue, resources, user who created it, etc.