Commit e75cff5f authored by Myle Ott's avatar Myle Ott Committed by Facebook Github Bot
Browse files

Relicense fairseq under MIT license (#786)

Summary:
The previous BSD+PATENTS license was controversial. We have been
approved to relicense fairseq under the MIT license.
Pull Request resolved: https://github.com/fairinternal/fairseq-py/pull/786

Differential Revision: D16560654

Pulled By: myleott

fbshipit-source-id: f78b1beb4f2895dd7b9bfc79f5f952a2bfb94034
parent c132b9b9
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
""" """
Train a network across multiple GPUs. Train a network across multiple GPUs.
......
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
from collections import defaultdict from collections import defaultdict
import copy import copy
......
#!/usr/bin/env python3 -u #!/usr/bin/env python3 -u
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
""" """
Translate pre-processed data with a trained model. Translate pre-processed data with a trained model.
""" """
......
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
import functools import functools
......
#!/usr/bin/env python3 -u #!/usr/bin/env python3 -u
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
""" """
Translate raw text with a trained model. Batches data on-the-fly. Translate raw text with a trained model. Batches data on-the-fly.
""" """
......
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
""" """
Data pre-processing: build vocabularies and binarize training data. Data pre-processing: build vocabularies and binarize training data.
""" """
......
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
""" """
BLEU scoring of generated translations against reference translations. BLEU scoring of generated translations against reference translations.
""" """
......
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
import argparse import argparse
import collections import collections
......
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
""" """
Use this script in order to build symmetric alignments for your translation Use this script in order to build symmetric alignments for your translation
dataset. dataset.
......
-- Copyright (c) 2017-present, Facebook, Inc. -- Copyright (c) Facebook, Inc. and its affiliates.
-- All rights reserved.
-- --
-- This source code is licensed under the license found in the LICENSE file in -- This source code is licensed under the MIT license found in the
-- the root directory of this source tree. An additional grant of patent rights -- LICENSE file in the root directory of this source tree.
-- can be found in the PATENTS file in the same directory.
-- --
-- Usage: convert_dictionary.lua <dict.th7> -- Usage: convert_dictionary.lua <dict.th7>
require 'fairseq' require 'fairseq'
......
-- Copyright (c) 2017-present, Facebook, Inc. -- Copyright (c) Facebook, Inc. and its affiliates.
-- All rights reserved.
-- --
-- This source code is licensed under the license found in the LICENSE file in -- This source code is licensed under the MIT license found in the
-- the root directory of this source tree. An additional grant of patent rights -- LICENSE file in the root directory of this source tree.
-- can be found in the PATENTS file in the same directory.
-- --
-- Usage: convert_model.lua <model_epoch1.th7> -- Usage: convert_model.lua <model_epoch1.th7>
require 'torch' require 'torch'
......
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
""" """
Count the number of documents and average number of lines and tokens per Count the number of documents and average number of lines and tokens per
document in a large file. Documents should be separated by a single empty line. document in a large file. Documents should be separated by a single empty line.
......
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
import argparse import argparse
......
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
import argparse import argparse
import os import os
......
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
""" """
Split a large file into shards while respecting document boundaries. Documents Split a large file into shards while respecting document boundaries. Documents
should be separated by a single empty line. should be separated by a single empty line.
......
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
""" """
Split a large file into a train and valid set while respecting document Split a large file into a train and valid set while respecting document
boundaries. Documents should be separated by a single empty line. boundaries. Documents should be separated by a single empty line.
......
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
""" """
Data pre-processing: build vocabularies and binarize training data. Data pre-processing: build vocabularies and binarize training data.
""" """
......
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
from setuptools import setup, find_packages, Extension from setuptools import setup, find_packages, Extension
import sys import sys
...@@ -37,7 +35,7 @@ setup( ...@@ -37,7 +35,7 @@ setup(
url='https://github.com/pytorch/fairseq', url='https://github.com/pytorch/fairseq',
classifiers=[ classifiers=[
'Intended Audience :: Science/Research', 'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License', 'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering :: Artificial Intelligence', 'Topic :: Scientific/Engineering :: Artificial Intelligence',
......
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
import collections import collections
import os import os
......
# Copyright (c) 2017-present, Facebook, Inc. # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# #
# This source code is licensed under the license found in the LICENSE file in # This source code is licensed under the MIT license found in the
# the root directory of this source tree. An additional grant of patent rights # LICENSE file in the root directory of this source tree.
# can be found in the PATENTS file in the same directory.
import unittest import unittest
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment