Skip to content

Commit

Permalink
header fixes (facebookresearch#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexholdenmiller authored May 2, 2017
1 parent 30b02b1 commit 0655a72
Show file tree
Hide file tree
Showing 18 changed files with 86 additions and 20 deletions.
Binary file removed .DS_Store
Binary file not shown.
7 changes: 5 additions & 2 deletions examples/drqa/train.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python3
# Copyright 2004-present Facebook. All Rights Reserved.
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
"""Trains (a partial) implementation of the DrQa Document Reader from:
Danqi Chen, Adam Fisch, Jason Weston, Antoine Bordes. 2017.
Expand Down
6 changes: 5 additions & 1 deletion examples/memnn_luatorch_cpu/params/params_babi.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
-- Copyright 2004-present Facebook. All Rights Reserved.
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
-- @lint-skip-luachecker

local cmdline = require('library.cmd')
Expand Down
6 changes: 5 additions & 1 deletion examples/memnn_luatorch_cpu/params/params_default.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
-- Copyright 2004-present Facebook. All Rights Reserved.
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
-- @lint-skip-luachecker

local cmdline = require('library.cmd')
Expand Down
6 changes: 5 additions & 1 deletion examples/memnn_luatorch_cpu/params/params_hogbabi.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
-- Copyright 2004-present Facebook. All Rights Reserved.
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
-- @lint-skip-luachecker

local cmdline = require('library.cmd')
Expand Down
6 changes: 5 additions & 1 deletion examples/memnn_luatorch_cpu/params/params_wikiqa.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
-- Copyright 2004-present Facebook. All Rights Reserved.
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
-- @lint-skip-luachecker

local cmdline = require('library.cmd')
Expand Down
6 changes: 5 additions & 1 deletion parlai/agents/drqa/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Copyright 2004-present Facebook. All Rights Reserved.
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
6 changes: 5 additions & 1 deletion parlai/agents/drqa/agents.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copyright 2004-present Facebook. All Rights Reserved.
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
import torch
import numpy as np
import logging
Expand Down
6 changes: 5 additions & 1 deletion parlai/agents/drqa/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copyright 2004-present Facebook. All Rights Reserved.
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
import os
import sys
import logging
Expand Down
6 changes: 5 additions & 1 deletion parlai/agents/drqa/layers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copyright 2004-present Facebook. All Rights Reserved.
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
import torch
import torch.nn as nn
import torch.nn.functional as F
Expand Down
6 changes: 5 additions & 1 deletion parlai/agents/drqa/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copyright 2004-present Facebook. All Rights Reserved.
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
import torch
import torch.nn as nn
import torch.optim as optim
Expand Down
6 changes: 5 additions & 1 deletion parlai/agents/drqa/rnn_reader.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copyright 2004-present Facebook. All Rights Reserved.
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
import torch
import torch.nn as nn
import numpy as np
Expand Down
6 changes: 5 additions & 1 deletion parlai/agents/drqa/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copyright 2004-present Facebook. All Rights Reserved.
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
import torch
import time
import unicodedata
Expand Down
9 changes: 6 additions & 3 deletions parlai/agents/ir_baseline/agents.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#!/usr/bin/env python3
# Copyright 2004-present Facebook. All Rights Reserved.
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
# Simple IR baselines.
# Implements the following variants:
# Given an input message, either:
# (i) find the most similar message in the (training) dataset and output the response from that exchange; or
# (ii) find the most similar response to the input directly.
# (iii) if label_candidates are provided, simply ranks them according to their similarity to the input message.
#
#
# Additonally, TFIDF is either used (requires building a dictionary) or not.

import math
Expand Down
6 changes: 5 additions & 1 deletion parlai/agents/memnn_luatorch_cpu/memnn_agent.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
-- Copyright 2004-present Facebook. All Rights Reserved.
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--[[
Takes in an observation table using the same format as usual for ParlAI, and
trains a memory network to produce the correct labels.
Expand Down
6 changes: 5 additions & 1 deletion parlai/agents/memnn_luatorch_cpu/memnn_agent_parsed.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
-- Copyright 2004-present Facebook. All Rights Reserved.
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--[[
This file has the same functionality as memnn_agent, except that it expects
(and returns) a zero-indexed vector (as a table) of word indices into the
Expand Down
6 changes: 5 additions & 1 deletion parlai/agents/memnn_luatorch_cpu/memnn_zmq.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
-- Copyright 2004-present Facebook. All Rights Reserved.
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--[[
This connects to local ports over ZMQ, parsing incoming json into a table and
forwarding that to the memnn_agent. This agent assumes that incoming data
Expand Down
6 changes: 5 additions & 1 deletion parlai/agents/memnn_luatorch_cpu/memnn_zmq_parsed.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
-- Copyright 2004-present Facebook. All Rights Reserved.
-- Copyright (c) 2017-present, Facebook, Inc.
-- All rights reserved.
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
--[[
This connects to local ports over ZMQ, parsing incoming json into a table and
forwarding that to the memnn_agent_parsed. This agent assumes that incoming data
Expand Down

0 comments on commit 0655a72

Please sign in to comment.