mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 18:29:08 +08:00
Rename .rayproject to ray-project (#6278)
This commit is contained in:
+2
-2
@@ -4,10 +4,10 @@ name: open-tacotron
|
||||
description: "A TensorFlow implementation of Google's Tacotron speech synthesis with pre-trained model (unofficial)"
|
||||
repo: https://github.com/keithito/tacotron
|
||||
|
||||
cluster: .rayproject/cluster.yaml
|
||||
cluster: ray-project/cluster.yaml
|
||||
|
||||
environment:
|
||||
requirements: .rayproject/requirements.txt
|
||||
requirements: ray-project/requirements.txt
|
||||
|
||||
shell:
|
||||
- curl http://data.keithito.com/data/speech/tacotron-20180906.tar.gz | tar xzC /tmp
|
||||
+2
-2
@@ -4,10 +4,10 @@ name: pytorch-transformers
|
||||
description: "A library of state-of-the-art pretrained models for Natural Language Processing (NLP)"
|
||||
repo: https://github.com/huggingface/pytorch-transformers
|
||||
|
||||
cluster: .rayproject/cluster.yaml
|
||||
cluster: ray-project/cluster.yaml
|
||||
|
||||
environment:
|
||||
requirements: .rayproject/requirements.txt
|
||||
requirements: ray-project/requirements.txt
|
||||
|
||||
commands:
|
||||
- name: train
|
||||
@@ -12,10 +12,10 @@ import yaml
|
||||
|
||||
class ProjectDefinition:
|
||||
def __init__(self, current_dir):
|
||||
"""Finds .rayproject folder for current project, parse and validates it.
|
||||
"""Finds ray-project folder for current project, parse and validates it.
|
||||
|
||||
Args:
|
||||
current_dir (str): Path from which to search for .rayproject.
|
||||
current_dir (str): Path from which to search for ray-project.
|
||||
|
||||
Raises:
|
||||
jsonschema.exceptions.ValidationError: This exception is raised
|
||||
@@ -31,7 +31,7 @@ class ProjectDefinition:
|
||||
self.root = os.path.join(root, "")
|
||||
|
||||
# Parse the project YAML.
|
||||
project_file = os.path.join(self.root, ".rayproject", "project.yaml")
|
||||
project_file = os.path.join(self.root, "ray-project", "project.yaml")
|
||||
if not os.path.exists(project_file):
|
||||
raise ValueError("Project file {} not found".format(project_file))
|
||||
with open(project_file) as f:
|
||||
@@ -127,12 +127,12 @@ def find_root(directory):
|
||||
directory (str): Directory to start the search in.
|
||||
|
||||
Returns:
|
||||
Path of the parent directory containing the .rayproject or
|
||||
Path of the parent directory containing the ray-project or
|
||||
None if no such project is found.
|
||||
"""
|
||||
prev, directory = None, os.path.abspath(directory)
|
||||
while prev != directory:
|
||||
if os.path.isdir(os.path.join(directory, ".rayproject")):
|
||||
if os.path.isdir(os.path.join(directory, "ray-project")):
|
||||
return directory
|
||||
prev, directory = directory, os.path.abspath(
|
||||
os.path.join(directory, os.pardir))
|
||||
@@ -160,7 +160,7 @@ def check_project_config(project_root, project_config):
|
||||
"""Checks if the project definition is valid.
|
||||
|
||||
Args:
|
||||
project_root (str): Path containing the .rayproject
|
||||
project_root (str): Path containing the ray-project
|
||||
project_config (dict): Project config definition
|
||||
|
||||
Raises:
|
||||
|
||||
@@ -26,11 +26,11 @@ logger = logging.getLogger(__file__)
|
||||
|
||||
# File layout for generated project files
|
||||
# user-dir/
|
||||
# .rayproject/
|
||||
# ray-project/
|
||||
# project.yaml
|
||||
# cluster.yaml
|
||||
# requirements.txt
|
||||
PROJECT_DIR = ".rayproject"
|
||||
PROJECT_DIR = "ray-project"
|
||||
PROJECT_YAML = os.path.join(PROJECT_DIR, "project.yaml")
|
||||
CLUSTER_YAML = os.path.join(PROJECT_DIR, "cluster.yaml")
|
||||
REQUIREMENTS_TXT = os.path.join(PROJECT_DIR, "requirements.txt")
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
name: "project1"
|
||||
|
||||
cluster: .rayproject/cluster.yaml
|
||||
cluster: ray-project/cluster.yaml
|
||||
|
||||
environment:
|
||||
requirements: requirements.txt
|
||||
+1
-1
@@ -5,7 +5,7 @@ name: commands-test
|
||||
# description: A short description of the project.
|
||||
repo: https://github.com/ray-project/not-exist
|
||||
|
||||
cluster: .rayproject/cluster.yaml
|
||||
cluster: ray-project/cluster.yaml
|
||||
|
||||
environment:
|
||||
shell:
|
||||
+2
-2
@@ -5,12 +5,12 @@ name: git-repo-pass
|
||||
# description: A short description of the project.
|
||||
repo: https://github.com/ray-project/not-exist
|
||||
|
||||
cluster: .rayproject/cluster.yaml
|
||||
cluster: ray-project/cluster.yaml
|
||||
|
||||
environment:
|
||||
# dockerfile: The dockerfile to be built and ran the commands with.
|
||||
# dockerimage: The docker image to be used to run the project in, e.g. ubuntu:18.04.
|
||||
requirements: .rayproject/requirements.txt
|
||||
requirements: ray-project/requirements.txt
|
||||
|
||||
shell: # Shell commands to be ran for environment setup.
|
||||
- echo "Setting up the environment"
|
||||
+3
-3
@@ -5,15 +5,15 @@ name: invalid-config-fail
|
||||
# description: A short description of the project.
|
||||
# repo: The URL of the repo this project is part of.
|
||||
|
||||
cluster: .rayproject/cluster.yaml
|
||||
cluster: ray-project/cluster.yaml
|
||||
|
||||
environment:
|
||||
# NOTE: The following is invalid because you can't have both dockerfile
|
||||
# and dockerimage
|
||||
dockerfile: The dockerfile to be built and ran the commands with.
|
||||
dockerimage: The docker image to be used to run the project in, e.g. ubuntu:18.04.
|
||||
|
||||
requirements: .rayproject/requirements.txt
|
||||
|
||||
requirements: ray-project/requirements.txt
|
||||
|
||||
shell: # Shell commands to be ran for environment setup.
|
||||
- echo "Setting up the environment"
|
||||
+2
-2
@@ -5,12 +5,12 @@ name: project-pass
|
||||
# description: A short description of the project.
|
||||
# repo: The URL of the repo this project is part of.
|
||||
|
||||
cluster: .rayproject/cluster.yaml
|
||||
cluster: ray-project/cluster.yaml
|
||||
|
||||
environment:
|
||||
# dockerfile: The dockerfile to be built and ran the commands with.
|
||||
# dockerimage: The docker image to be used to run the project in, e.g. ubuntu:18.04.
|
||||
requirements: .rayproject/requirements.txt
|
||||
requirements: ray-project/requirements.txt
|
||||
|
||||
shell: # Shell commands to be ran for environment setup.
|
||||
- echo "Setting up the environment"
|
||||
+1
-1
@@ -5,7 +5,7 @@ name: with-docker-fail
|
||||
# description: A short description of the project.
|
||||
# repo: The URL of the repo this project is part of.
|
||||
|
||||
cluster: .rayproject/cluster.yaml
|
||||
cluster: ray-project/cluster.yaml
|
||||
|
||||
environment:
|
||||
# dockerfile: The dockerfile to be built and ran the commands with.
|
||||
Reference in New Issue
Block a user