-
xpra
sudo apt-get install xpra
-
jdk 1.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (c) Facebook, Inc. and its affiliates. Confidential and proprietary. | |
# @manual=//faiss/python:pyfaiss | |
import faiss | |
import hydra | |
import glob | |
import json | |
import os | |
import pickle | |
import torch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import argparse | |
import numpy as np | |
import pickle | |
import collections | |
import jsonlines | |
import torch | |
import glob | |
import scipy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import argparse | |
import numpy as np | |
import pickle | |
import collections | |
import jsonlines | |
import torch | |
import glob | |
import scipy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Pyserini: Python interface to the Anserini IR toolkit built on Lucene | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Copyright (c) Facebook, Inc. and its affiliates. | |
# All rights reserved. | |
# | |
# This source code is licensed under the license found in the | |
# LICENSE file in the root directory of this source tree. | |
""" | |
Command line tool to get dense results and validate them | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. retrieve top-k passages for each query | |
# 2. merge the top-k passages and get the union | |
# 3. calculate the dot-product on the union for each query | |
# 3.5. save the dot-products into .pkl or .npy file | |
# 4. put the score into this function and get mutual information | |
def get_mi(self, logits, tau=1.0): # logits are the dot-product scores, size: QxP, where Q is the number of queries, P is the number of retrieved passages | |
# tau is the temperature coef that controls the sharpness of the distribution | |
# numeric stability | |
max_logit = np.max(logits, axis=-1, keepdims=True) | |
probs = np.exp((logits - max_logit)/tau)/np.sum(np.exp((logits - max_logit)/tau), -1, keepdims=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> | |
<Mission xmlns="http://ProjectMalmo.microsoft.com"> | |
<About> | |
<Summary>$(ENV_NAME)</Summary> | |
</About> | |
<ModSettings> | |
<MsPerTick>50</MsPerTick> | |
<!--<PrioritiseOffscreenRendering>true</PrioritiseOffscreenRendering>--> | |
</ModSettings> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#SBATCH --mem=50G | |
#SBATCH -c 8 | |
#SBATCH --gres=gpu:1 | |
#SBATCH -p gpu | |
CKPT=/checkpoint/minghan/${SLURM_JOB_ID} | |
touch $CKPT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
import collections | |
from dm_control import mujoco | |
from dm_control.rl import control | |
from dm_control.suite import base | |
from dm_control.suite import common |
NewerOlder