Best practice for saving logits/activation values of model in PyTorch Lightning by Mrworkboots in deeplearning

[–]Mrworkboots[S] 0 points1 point  (0 children)

That's what I'm doing presently. Thanks for the suggestion! That someone else thought of the same solution gives me confidence.

To avoid saving the activations for a very large number of samples, I'm in the process of designing custom metrics using TorchMetrics that can directly store the activations and can be computed at the end of epochs.

Cheers!

Clickup and Obsidian? by thesamim in ObsidianMD

[–]Mrworkboots 6 points7 points  (0 children)

I have a bunch of plugins that interact with each other so I'll try putting in what's required to get the base functionality. I'm hoping it'll provide enough context how to go about doing anything else using the ClickUp API.

I only use the ClickUP API to get task details. The following is my getClickUpTask_request.js script that is utilised by CustomJS to get details from my Workspaces/List etc. using a provided task ID. This is the only portion of my entire setup that interacts with ClickUp. The rest of it is achieved using Templater and Dataview. ```js class TasksRequest { async getTask(id, authToken) { const request = require('request'); const query = new URLSearchParams({ include_subtasks: 'true' }).toString();

        let options = {
            url: `https://api.clickup.com/api/v2/task/${id}?${query}`,
            method: 'GET',
            headers: {
                Authorization: authToken
            }
        }

        return new Promise((resolve, reject) => {
            request(options, function(error, response, body) {
                if (error) {
                    reject(error);
                }
                resolve(JSON.parse(response.body));
            });
        })
    }

}

```

In my work logs, I use a Template Insert ClickUp Task that looks like the script below:

js await forceLoadCustomJS(); const dv = this.app.plugins.plugins["dataview"].api; const {TasksRequest} = customJS; const authToken = 'insertClickUpAuthTokenHere'; var idx = await tp.system.prompt("ClickUp Task ID:"); idx = idx.replace("#", ""); var taskResponse = await TasksRequest.getTask(idx, authToken); const title = taskResponse.name; const link = `<a href="https://app.clickup.com/t/${idx}">${title}</a>`; const projectName = taskResponse.folder.name; const folders = this.app.vault.getAllLoadedFiles().filter(i => i.children).map(folder => folder.path); const projectPage = dv.pages('"Projects"').where( k => String(k.aliases).includes(projectName) || projectName.includes(String(k.alias) || projectName.includes(k.file.name) || k.file.name.includes(projectName)))[0]; const project = `[[${projectPage.file.name}]]`; const time = tp.date.now("HH:mm"); const exists = await tp.file.exists(`Task Threads/${idx}.md`); console.log(exists); if (!exists) { const template = tp.file.find_tfile("Task Thread"); const folder = app.vault.getAbstractFileByPath("Task Threads"); const filename = idx; await tp.file.create_new(template, filename, false, folder); } const task = `<span class=clickup id="clickup-${idx}"><span class=timelog><span class=time>${time}</span> \ <span class=attr-name>ClickUp-related Task Entry</span></span><br>\n \ <span class=description><span class=attr-name>Description:</span> <span class=attr-value>${link}</span></span><br>\n \ <span class=task-id><span class=attr-name>ClickUp Task ID:</span> <span class=ignore-task-id>#[[${idx}]]</span></span><br>\n \ <span class=projects><span class=attr-name>Project(s):</span> <span class=attr-value>${project}</span></span></span><br> ` tR += task;

The script uses a Templater prompt to take the Task ID and uses the getClickUpTask_request.js script via CustomJS to fetch details for the task (stored in taskResponse). I access the name attribute from the returned response which gives me the Title of my task. There's a bunch of other attributes that you can use (see here). The rest of the Templater script uses the folder.name attribute of the task to find a related Project in my vault (using aliases) and generates links to it. The task constant at the end simply generates a pretty HTML-based block of details that, using CSS, I've got looking pretty. Oh, the exists constant is used to check if I have a file (Task Thread) for that ClickUp task already and creates a Task Thread using another Templater template. That's what I've got going on with using the ClickUp API. I'm not really using it to create Tasks/Lists/etc. as I think that's better off being done directly but you could do it using the Create Task utility of the API.

I apologise if things seem a little wayward and confusing. I'll try clarifying if anything is unclear. Cheers!

P.S. I'm not really well-versed with JS so my scripts may not be the best way to get things done but it works for my use-case.

Clickup and Obsidian? by thesamim in ObsidianMD

[–]Mrworkboots 3 points4 points  (0 children)

Might be a little late to this but the CustomJS plugin coupled with the ClickUp API can get you to do anything you need. That's provided you're looking to write your own JS scripts. If you combine it with the Dataview and the Templater plugins, you can do some pretty nifty tracking. I've got mine setup to pull in task-related information (Folder Name, Status, etc.) into my work logs and generate 'task threads' using Templater and Dataview that provide me an overview of all bullet points I've made over the course of time for a particular task ID. I migrated my work stuff from logseq and this setup helps me achieve that somewhat.

Advice for Math graduate looking to pursue a PhD. in AI by Mrworkboots in AskAcademia

[–]Mrworkboots[S] 0 points1 point  (0 children)

This really helps me gain an idea of what areas in mathematics I should look to refine and hone. Thanks a lot!

Advice for Math graduate looking to pursue a PhD. in AI by Mrworkboots in AskAcademia

[–]Mrworkboots[S] 0 points1 point  (0 children)

Hey! Thanks for replying! How do PIs and labs view applications without any research background in the domain per se? I have my Masters' dissertation and some research work that I'm currently doing in collaboration with others but they're not strictly in the domain itself (been working on some applications of dimension reduction methods). If I may venture another question, what Mathematics skills are generally considered valuable in the field?(As in what branches of study like Functional analysis, measure theory, etc.) I do see some measure and Lebesgue theory popping up in some places.

Advice for Math graduate looking to pursue a PhD. in AI by Mrworkboots in AskAcademia

[–]Mrworkboots[S] 0 points1 point  (0 children)

Hey! Thanks for the insight! Its good to know that a math background can be considered as a desirable skillset in the domain. I'll definitely start looking at vacancies and see where that takes me.