Struct ExperimentFiles

Source
pub struct ExperimentFiles {
    pub host: Option<String>,
    pub username: Option<String>,
    pub binary_call: Option<PathBuf>,
    pub binary: Option<PathBuf>,
    pub root: Option<PathBuf>,
    pub cfg_contents: Option<String>,
    pub parsed_cfg: Option<Token>,
    pub runs_path: Option<PathBuf>,
    pub experiments: Vec<ConfigurationValue>,
    pub launch_configurations: Vec<ConfigurationValue>,
    pub packed_results: ConfigurationValue,
    /* private fields */
}
Expand description

Each experiment owns some files:

  • main.cfg
  • main.od
  • remote
  • launch in the future, instead of being inside main.cfg
  • runs/{run#,job#}
  • binary.results

Fields§

§host: Option<String>

The host with the path of these files. None if it is the hosting where this instance of caminos is running.

§username: Option<String>

Optional username to access the host.

§binary_call: Option<PathBuf>

How caminos was called in the terminal.

§binary: Option<PathBuf>

The path where caminos binary file is located.

§root: Option<PathBuf>

The root path of the experiments

§cfg_contents: Option<String>

The raw contents of the main.cfg file

§parsed_cfg: Option<Token>
§runs_path: Option<PathBuf>§experiments: Vec<ConfigurationValue>

The experiments as extracted from the main.cfg.

§launch_configurations: Vec<ConfigurationValue>

The list of configurations for launch. Either extracted from main.cfg field launch_configurations or from the launch file (TODO the latter).

§packed_results: ConfigurationValue

The results packeted (or to be packeted) in binary.results.

Implementations§

Source§

impl ExperimentFiles

Source

pub fn build_cfg_contents(&mut self) -> Result<(), Error>

Reads and stores the contents of main.cfg.

Source

pub fn cfg_contents_ref(&self) -> &String

Source

pub fn cfg_enough_content(&self) -> bool

If main.cfg has enough content to be considered correct. For a quick check without parsing it.

Source

pub fn build_parsed_cfg(&mut self) -> Result<(), Error>

Source

pub fn build_root_path(&mut self) -> Result<(), Error>

Builds the root directory and all parents.

Source

pub fn build_runs_path(&mut self) -> Result<(), Error>

Source

pub fn build_experiments(&mut self) -> Result<(), Error>

Source

pub fn build_launch_configurations(&mut self) -> Result<(), Error>

Source

pub fn compare_cfg(&self, other: &ExperimentFiles) -> Result<(), Error>

Returns Ok if their main.cfg content is the same Otherwise returns an error and prints a diff.

Source

pub fn build_packed_results(&mut self)

Source

pub fn get_outputs_path(&self) -> PathBuf

The directory where to store the generated output files from the Output action.

Source

pub fn example_cfg() -> &'static str

Source

pub fn example_od() -> &'static str

Source

pub fn example_remote() -> &'static str

Trait Implementations§

Source§

impl Debug for ExperimentFiles

We have to implement Debug explicitly because Session does not implement Debug.

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V