0%

Manage Channels

Add

add a channel with highest priority.

1
conda config --add channels new_channel_url
add a channel with lowest priority
1
conda config --append channels new_channel_url

delete

1
conda config --remove channels channel_url

show

1
conda config --show channels

PyTorch Geometric

Traditionally, these libraries don’t do what they call “vendoring”, i.e. they expect you to have CUDA installed on your system.

In our case, PyTorch Geometric doesn’t vendor CUDA, but PyTorch vendors its own CUDA. so when you install pytorch 1.11 with cuda 11.3, it means that pytorch calls its own cuda 11.3, not the system-wide one. In the case of Great Lakes, the system-wide one is 11.8.

(pytorch does this b/c it’s a lot easier to install for users, especially researchers who are not as familiar with computer systems as engineers.)

but notice that pytorch geometric doesn’t vendor, so it calls the system wide one.

now pytorch geometric still expects a certain version of CUDA installed on the system. That’s why if you go to their website, it’ll tell you how to install versions of pytorch geometric that use different versions of CUDA.

now it’s most likely that the segfault error you’re seeing is coming from the fact that pytorch produces some tensors using one version of cuda, but pytorch geometric is processing those tensors using another version of cuda.

so you need to ensure that pytorch uses the same version of cuda as pytorch geometric.

the system wide CUDA just has to be compatible with the version pytorch geometric is targeted to.

alright, i just said a lot of things. do you follow? lol

Make sure

PyG Installation

Using pip command: pip install pyg-lib torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-{torch_version}+cu{cuda_version}.html

Important: Sometimes we need to assign specific torch-sparse, torch-scatter version from pyg wheel website!


Reference My mentor Yu

Some quotings

"Deep Learning" by Goodfellow > The function we want to minimize or maximize is called the objective function, or criterion. When we are minimizing it, we may also call it the cost functionloss function, or error function. In this book, we use these terms interchangeably, though some machine learning publications assign special meaning to some of these terms.

Andrew NG >"Finally, the loss function was defined with respect to a single training example. It measures how well you're doing on a single training example. I'm now going to define something called the cost function, which measures how well you're doing an entire training set. So the cost function J which is applied to your parameters W and B is going to be the average with one of the m of the sum of the loss function applied to each of the training examples and turn."

Conclusion

Objective function: is our target, whether minimize or maximize; e.g. MLE maximum likelihood estimation Cost function: is sum of loss function with additional regularization term. (on a trianing set scale); e.g. MSE mean squared error Loss function: is a function defined on data point, prediction and label, which measures penalty. (on a single sample). e.g. Square loss, hinge loss


Reference https://stats.stackexchange.com/questions/179026/objective-function-cost-function-loss-function-are-they-the-same-thing

docker-compose.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
version: '2.2'

services:

sharelatex:

restart: always

# Server Pro users:

# image: quay.io/sharelatex/sharelatex-pro

image: sharelatex/sharelatex

container_name: sharelatex

depends_on:

mongo:

condition: service_healthy

redis:

condition: service_started

ports:

- 80:80

links:

- mongo

- redis

volumes:

- ~/sharelatex_data:/var/lib/sharelatex

########################################################################

#### Server Pro: Uncomment the following line to mount the docker ####

#### socket, required for Sibling Containers to work ####

########################################################################

# - /var/run/docker.sock:/var/run/docker.sock

environment:

SHARELATEX_APP_NAME: Overleaf Community Edition

SHARELATEX_MONGO_URL: mongodb://mongo/sharelatex

# Same property, unfortunately with different names in

# different locations

SHARELATEX_REDIS_HOST: redis

REDIS_HOST: redis

ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'

# Enables Thumbnail generation using ImageMagick

ENABLE_CONVERSIONS: 'true'

# Disables email confirmation requirement

EMAIL_CONFIRMATION_DISABLED: 'true'

# temporary fix for LuaLaTex compiles

# see https://github.com/overleaf/overleaf/issues/695

TEXMFVAR: /var/lib/sharelatex/tmp/texmf-var

## Set for SSL via nginx-proxy

#VIRTUAL_HOST: 103.112.212.22

# SHARELATEX_SITE_URL: http://sharelatex.mydomain.com

# SHARELATEX_NAV_TITLE: Our ShareLaTeX Instance

# SHARELATEX_HEADER_IMAGE_URL: http://somewhere.com/mylogo.png

# SHARELATEX_ADMIN_EMAIL: [email protected]

# SHARELATEX_LEFT_FOOTER: '[{"text": "Powered by <a href=\"https://www.sharelatex.com\">ShareLaTeX</a> 2016"},{"text": "Another page I want to link to can be found <a href=\"here\">here</a>"} ]'

# SHARELATEX_RIGHT_FOOTER: '[{"text": "Hello I am on the Right"} ]'

# SHARELATEX_EMAIL_FROM_ADDRESS: "[email protected]"

# SHARELATEX_EMAIL_AWS_SES_ACCESS_KEY_ID:

# SHARELATEX_EMAIL_AWS_SES_SECRET_KEY:

# SHARELATEX_EMAIL_SMTP_HOST: smtp.mydomain.com

# SHARELATEX_EMAIL_SMTP_PORT: 587

# SHARELATEX_EMAIL_SMTP_SECURE: false

# SHARELATEX_EMAIL_SMTP_USER:

# SHARELATEX_EMAIL_SMTP_PASS:

# SHARELATEX_EMAIL_SMTP_TLS_REJECT_UNAUTH: true

# SHARELATEX_EMAIL_SMTP_IGNORE_TLS: false

# SHARELATEX_EMAIL_SMTP_NAME: '127.0.0.1'

# SHARELATEX_EMAIL_SMTP_LOGGER: true

# SHARELATEX_CUSTOM_EMAIL_FOOTER: "This system is run by department x"

################

## Server Pro ##

################

# SANDBOXED_COMPILES: 'true'

# SANDBOXED_COMPILES_SIBLING_CONTAINERS: 'true'

# SANDBOXED_COMPILES_HOST_DIR: '/var/sharelatex_data/data/compiles'

# DOCKER_RUNNER: 'false'

## Works with test LDAP server shown at bottom of docker compose

# SHARELATEX_LDAP_URL: 'ldap://ldap:389'

# SHARELATEX_LDAP_SEARCH_BASE: 'ou=people,dc=planetexpress,dc=com'

# SHARELATEX_LDAP_SEARCH_FILTER: '(uid={{username}})'

# SHARELATEX_LDAP_BIND_DN: 'cn=admin,dc=planetexpress,dc=com'

# SHARELATEX_LDAP_BIND_CREDENTIALS: 'GoodNewsEveryone'

# SHARELATEX_LDAP_EMAIL_ATT: 'mail'

# SHARELATEX_LDAP_NAME_ATT: 'cn'

# SHARELATEX_LDAP_LAST_NAME_ATT: 'sn'

# SHARELATEX_LDAP_UPDATE_USER_DETAILS_ON_LOGIN: 'true'

# SHARELATEX_TEMPLATES_USER_ID: "578773160210479700917ee5"

# SHARELATEX_NEW_PROJECT_TEMPLATE_LINKS: '[ {"name":"All Templates","url":"/templates/all"}]'

# SHARELATEX_PROXY_LEARN: "true"

mongo:

restart: always

image: mongo:4.4

container_name: mongo

expose:

- 27017

volumes:

- ~/mongo_data:/data/db

healthcheck:

test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet

interval: 10s

timeout: 10s

retries: 5

redis:

restart: always

image: redis:5

container_name: redis

expose:

- 6379

volumes:

- ~/redis_data:/data

Vim

1
2
3
4
5
6
7
8
9
10
#yank next word
yaw
#next/previous full page
C-f
C-b
#next/previous half page
C-d
C-u
#search key word
/

NERDTree

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#change window
C-w-w
#change tab
C-h
C-l
#new tab
C-n
#toggle tree
C-t
#open, vertical split, horizontal split/(silently)
o
i
s
go
gi
gs
#change root
C

Python-mode

1
2
#auto completion
C-space